diff --git a/.mock/definition/hris/dependents.yml b/.mock/definition/hris/dependents.yml index bab4360c1..75cac5b7d 100644 --- a/.mock/definition/hris/dependents.yml +++ b/.mock/definition/hris/dependents.yml @@ -25,6 +25,9 @@ service: cursor: type: optional docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return dependents for this employee. include_deleted_data: type: optional docs: >- diff --git a/.mock/definition/hris/employees.yml b/.mock/definition/hris/employees.yml index df2cd00f7..04d390595 100644 --- a/.mock/definition/hris/employees.yml +++ b/.mock/definition/hris/employees.yml @@ -1183,6 +1183,9 @@ service: display_full_name: type: optional docs: If provided, will only return employees with this display name. + employee_number: + type: optional + docs: If provided, will only return employees with this employee number. employment_status: type: optional docs: >- diff --git a/.mock/definition/knowledgebase/__package__.yml b/.mock/definition/knowledgebase/__package__.yml new file mode 100644 index 000000000..ed7582157 --- /dev/null +++ b/.mock/definition/knowledgebase/__package__.yml @@ -0,0 +1,2225 @@ +types: + AccountDetailsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsCategory: + discriminated: false + union: + - CategoryEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetailsAndActionsStatus: + discriminated: false + union: + - AccountDetailsAndActionsStatusEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatus + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + Whether a Production Linked Account's credentials match another + existing Production Linked Account. This field is `null` for Test + Linked Accounts, incomplete Production Linked Accounts, and ignored + duplicate Production Linked Account sets. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + ArticleAuthor: + discriminated: false + docs: The user who created the article. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + ArticleLastEditedBy: + discriminated: false + docs: The user to last update the article. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + ArticleVisibility: + discriminated: false + docs: |- + The visibility of the article. + + * `PUBLIC` - PUBLIC + * `INTERNAL` - INTERNAL + * `RESTRICTED` - RESTRICTED + union: + - VisibilityEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + ArticleStatus: + discriminated: false + docs: |- + The status of the article. + + * `DRAFT` - DRAFT + * `PUBLISHED` - PUBLISHED + * `ARCHIVED` - ARCHIVED + * `TRASH` - TRASH + union: + - Status3C6Enum + - string + source: + openapi: openapi/openapi.yml + inline: true + ArticleType: + discriminated: false + docs: |- + The type of the article. + + * `PAGE` - PAGE + * `BLOG_POST` - BLOG_POST + * `SMART_LINK` - SMART_LINK + union: + - ArticleTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + ArticleParentArticle: + discriminated: false + docs: The parent article an article is nested within. + union: + - type: string + validation: + format: uuid + - Article + source: + openapi: openapi/openapi.yml + inline: true + ArticleParentContainer: + discriminated: false + docs: The parent container an article is nested within. + union: + - type: string + validation: + format: uuid + - Container + source: + openapi: openapi/openapi.yml + inline: true + ArticleRootContainer: + discriminated: false + docs: >- + The top-level container in the hierarchy that holds this article. This + will reference a container object that will typically be a SPACE or + WORKSPACE type. + union: + - type: string + validation: + format: uuid + - Container + source: + openapi: openapi/openapi.yml + inline: true + ArticlePermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true + ArticleAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: openapi/openapi.yml + inline: true + Article: + docs: >- + # The Article Object + + ### Description + + The `Article` object is used to represent a form of content in the + knowledge base, such as an article or page. + + ### Usage Example + + Fetch from the `GET /api/knowledgebase/v1/articles` endpoint and view + their articles. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + title: + type: optional + docs: The title of the article. + validation: + maxLength: 254 + description: + type: optional + docs: Description of the article. + validation: + maxLength: 2000 + author: + type: optional + docs: The user who created the article. + last_edited_by: + type: optional + docs: The user to last update the article. + visibility: + type: optional + docs: |- + The visibility of the article. + + * `PUBLIC` - PUBLIC + * `INTERNAL` - INTERNAL + * `RESTRICTED` - RESTRICTED + article_content_download_url: + type: optional + docs: The presigned S3 URL to fetch article content. + access: read-only + checksum: + type: optional + docs: The SHA256 checksum of the article content. + validation: + maxLength: 254 + article_url: + type: optional + docs: The URL to the webpage of the article. + validation: + maxLength: 2000 + status: + type: optional + docs: |- + The status of the article. + + * `DRAFT` - DRAFT + * `PUBLISHED` - PUBLISHED + * `ARCHIVED` - ARCHIVED + * `TRASH` - TRASH + type: + type: optional + docs: |- + The type of the article. + + * `PAGE` - PAGE + * `BLOG_POST` - BLOG_POST + * `SMART_LINK` - SMART_LINK + remote_created_at: + type: optional + docs: When the third party's article was created. + remote_updated_at: + type: optional + docs: When the third party's article was updated. + parent_article: + type: optional + docs: The parent article an article is nested within. + parent_container: + type: optional + docs: The parent container an article is nested within. + root_container: + type: optional + docs: >- + The top-level container in the hierarchy that holds this article. This + will reference a container object that will typically be a SPACE or + WORKSPACE type. + permissions: optional> + attachments: optional>> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ArticleTypeEnum: + enum: + - PAGE + - BLOG_POST + - SMART_LINK + docs: |- + * `PAGE` - PAGE + * `BLOG_POST` - BLOG_POST + * `SMART_LINK` - SMART_LINK + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + Attachment: + docs: >- + # The Attachment Object + + ### Description + + The `Attachment` object is used to represent an attachment to an article + or container. + + ### Usage Example + + Fetch from the `GET /api/knowledgebase/v1/attachments` endpoint and view + their attachments. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The attachment's name. + validation: + maxLength: 254 + description: + type: optional + docs: The attachment's description. + validation: + maxLength: 2000 + attachment_url: + type: optional + docs: The attachment's url. + validation: + maxLength: 2000 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AuditLogEventRole: + discriminated: false + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by a + user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + union: + - RoleEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AuditLogEventEventType: + discriminated: false + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + union: + - EventTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: AuditLogEventRole + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: AuditLogEventEventType + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + - knowledgebase + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + - knowledgebase + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + * `knowledgebase` - knowledgebase + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + CompletedAccountInitialScreenEnum: + type: literal<"SELECTIVE_SYNC"> + docs: '* `SELECTIVE_SYNC` - SELECTIVE_SYNC' + ContainerStatus: + discriminated: false + docs: |- + The container's status. + + * `DRAFT` - DRAFT + * `PUBLISHED` - PUBLISHED + * `ARCHIVED` - ARCHIVED + * `TRASH` - TRASH + union: + - Status3C6Enum + - string + source: + openapi: openapi/openapi.yml + inline: true + ContainerType: + discriminated: false + docs: |- + The container's type. + + * `FOLDER` - FOLDER + * `SPACE` - SPACE + * `COLLECTION` - COLLECTION + * `SECTION` - SECTION + * `CATEGORY` - CATEGORY + * `DATABASE` - DATABASE + union: + - ContainerTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + ContainerVisibility: + discriminated: false + docs: |- + The container's visibility. + + * `PUBLIC` - PUBLIC + * `INTERNAL` - INTERNAL + * `RESTRICTED` - RESTRICTED + union: + - VisibilityEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + ContainerPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true + Container: + docs: >- + # The Container Object + + ### Description + + The Container object is used to represent a grouping of articles in the + knowledge base. This can include Spaces, Folders, Databases, etc. + + ### Usage Example + + Fetch from the `GET /api/knowledgebase/v1/containers` endpoint and view + their containers. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: Name of the container. + validation: + maxLength: 254 + description: + type: optional + docs: Description of the container. + validation: + maxLength: 2000 + status: + type: optional + docs: |- + The container's status. + + * `DRAFT` - DRAFT + * `PUBLISHED` - PUBLISHED + * `ARCHIVED` - ARCHIVED + * `TRASH` - TRASH + container_url: + type: optional + docs: The URL to the webpage of the container. + validation: + maxLength: 2000 + type: + type: optional + docs: |- + The container's type. + + * `FOLDER` - FOLDER + * `SPACE` - SPACE + * `COLLECTION` - COLLECTION + * `SECTION` - SECTION + * `CATEGORY` - CATEGORY + * `DATABASE` - DATABASE + visibility: + type: optional + docs: |- + The container's visibility. + + * `PUBLIC` - PUBLIC + * `INTERNAL` - INTERNAL + * `RESTRICTED` - RESTRICTED + remote_created_at: + type: optional + docs: When the third party's container was created. + remote_updated_at: + type: optional + docs: When the third party's container was updated. + parent_article: + type: optional + docs: The parent article a container is nested within. + validation: + format: uuid + parent_container: + type: optional + docs: The parent container a container is nested within. + validation: + format: uuid + permissions: optional> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ContainerTypeEnum: + enum: + - FOLDER + - SPACE + - COLLECTION + - SECTION + - CATEGORY + - DATABASE + docs: |- + * `FOLDER` - FOLDER + * `SPACE` - SPACE + * `COLLECTION` - COLLECTION + * `SECTION` - SECTION + * `CATEGORY` - CATEGORY + * `DATABASE` - DATABASE + source: + openapi: openapi/openapi.yml + DataPassthroughRequestMethod: + discriminated: false + union: + - MethodEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + DataPassthroughRequestRequestFormat: + discriminated: false + union: + - RequestFormatEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: DataPassthroughRequestMethod + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + - CREATED_DESTINATION + - DELETED_DESTINATION + - CHANGED_DESTINATION + - CHANGED_SCOPES + - CHANGED_PERSONAL_INFORMATION + - CHANGED_ORGANIZATION_SETTINGS + - ENABLED_INTEGRATION + - DISABLED_INTEGRATION + - ENABLED_CATEGORY + - DISABLED_CATEGORY + - CHANGED_PASSWORD + - RESET_PASSWORD + - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - + CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + + * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - + DELETED_INTEGRATION_WIDE_FIELD_MAPPING + + * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - + DELETED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Container: optional> + Article: optional> + Attachment: optional> + User: optional> + Group: optional> + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + jmes_path: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Container: optional> + Article: optional> + Attachment: optional> + User: optional> + Group: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + GroupParentGroup: + discriminated: false + docs: The parent group for this group. + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + GroupUsersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + Group: + docs: >- + # The Group Object + + ### Description + + The `Group` object is used to represent any subset of `Users`. This can + extend to company domains as well. + + ### Usage Example + + Fetch from the `GET /api/knowledgebase/v1/groups` endpoint and view their + groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The group's name. + validation: + maxLength: 254 + parent_group: + type: optional + docs: The parent group for this group. + users: optional> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IssueStatus: + discriminated: false + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + union: + - IssueStatusEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequestEncoding: + discriminated: false + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + union: + - EncodingEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedArticleList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedContainerList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PermissionUser: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + PermissionGroup: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + PermissionType: + discriminated: false + docs: |- + Denotes what type of people have access to the Article or Container. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + union: + - PermissionTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + Permission: + docs: >- + # The Permission Object + + ### Description + + The `Permission` object is used to represent a user's or group's access to + an article or container. Permissions are unexpanded by default. + + ### Usage Example + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: optional + group: optional + type: + type: optional + docs: |- + Denotes what type of people have access to the Article or Container. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + roles: + type: optional>> + docs: >- + The permissions that the user or group has for the Article or + Container. It is possible for a user or group to have multiple roles, + such as viewing & uploading. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PermissionTypeEnum: + enum: + - USER + - GROUP + - COMPANY + - ANYONE + docs: |- + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldApiAdvancedMetadata: + discriminated: false + union: + - AdvancedMetadata + - string + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Container: optional> + Article: optional> + Attachment: optional> + User: optional> + Group: optional> + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponseResponseType: + discriminated: false + union: + - ResponseTypeEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + RolesEnum: + enum: + - READ + - WRITE + - OWNER + docs: |- + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + Status3C6Enum: + enum: + - DRAFT + - PUBLISHED + - ARCHIVED + - TRASH + docs: |- + * `DRAFT` - DRAFT + * `PUBLISHED` - PUBLISHED + * `ARCHIVED` - ARCHIVED + * `TRASH` - TRASH + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatusLastSyncResult: + discriminated: false + union: + - LastSyncResultEnum + - string + source: + openapi: openapi/openapi.yml + inline: true + SyncStatusStatus: + discriminated: false + union: + - StatusFd5Enum + - string + source: + openapi: openapi/openapi.yml + inline: true + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: SyncStatusStatus + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user within the Knowledge Base + account. + + ### Usage Example + + Fetch from the `GET /api/knowledgebase/v1/users` endpoint and view their + users. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + validation: + maxLength: 254 + email_address: + type: optional + docs: The user's email address. + validation: + maxLength: 2000 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + VisibilityEnum: + enum: + - PUBLIC + - INTERNAL + - RESTRICTED + docs: |- + * `PUBLIC` - PUBLIC + * `INTERNAL` - INTERNAL + * `RESTRICTED` - RESTRICTED + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/accountDetails.yml b/.mock/definition/knowledgebase/accountDetails.yml new file mode 100644 index 000000000..06ff462ad --- /dev/null +++ b/.mock/definition/knowledgebase/accountDetails.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /knowledgebase/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/accountToken.yml b/.mock/definition/knowledgebase/accountToken.yml new file mode 100644 index 000000000..7cbde0f3e --- /dev/null +++ b/.mock/definition/knowledgebase/accountToken.yml @@ -0,0 +1,46 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /knowledgebase/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + headers: + X-Account-Token: '[object Object]' + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/articles.yml b/.mock/definition/knowledgebase/articles.yml new file mode 100644 index 000000000..b2d3fdc69 --- /dev/null +++ b/.mock/definition/knowledgebase/articles.yml @@ -0,0 +1,757 @@ +types: + ArticlesListRequestExpand: + enum: + - attachments + - value: attachments,author + name: AttachmentsAuthor + - value: attachments,author,last_edited_by + name: AttachmentsAuthorLastEditedBy + - value: attachments,author,last_edited_by,parent_article + name: AttachmentsAuthorLastEditedByParentArticle + - value: attachments,author,last_edited_by,parent_article,parent_container + name: AttachmentsAuthorLastEditedByParentArticleParentContainer + - value: >- + attachments,author,last_edited_by,parent_article,parent_container,root_container + name: AttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: attachments,author,last_edited_by,parent_article,root_container + name: AttachmentsAuthorLastEditedByParentArticleRootContainer + - value: attachments,author,last_edited_by,parent_container + name: AttachmentsAuthorLastEditedByParentContainer + - value: attachments,author,last_edited_by,parent_container,root_container + name: AttachmentsAuthorLastEditedByParentContainerRootContainer + - value: attachments,author,last_edited_by,root_container + name: AttachmentsAuthorLastEditedByRootContainer + - value: attachments,author,parent_article + name: AttachmentsAuthorParentArticle + - value: attachments,author,parent_article,parent_container + name: AttachmentsAuthorParentArticleParentContainer + - value: attachments,author,parent_article,parent_container,root_container + name: AttachmentsAuthorParentArticleParentContainerRootContainer + - value: attachments,author,parent_article,root_container + name: AttachmentsAuthorParentArticleRootContainer + - value: attachments,author,parent_container + name: AttachmentsAuthorParentContainer + - value: attachments,author,parent_container,root_container + name: AttachmentsAuthorParentContainerRootContainer + - value: attachments,author,root_container + name: AttachmentsAuthorRootContainer + - value: attachments,last_edited_by + name: AttachmentsLastEditedBy + - value: attachments,last_edited_by,parent_article + name: AttachmentsLastEditedByParentArticle + - value: attachments,last_edited_by,parent_article,parent_container + name: AttachmentsLastEditedByParentArticleParentContainer + - value: >- + attachments,last_edited_by,parent_article,parent_container,root_container + name: AttachmentsLastEditedByParentArticleParentContainerRootContainer + - value: attachments,last_edited_by,parent_article,root_container + name: AttachmentsLastEditedByParentArticleRootContainer + - value: attachments,last_edited_by,parent_container + name: AttachmentsLastEditedByParentContainer + - value: attachments,last_edited_by,parent_container,root_container + name: AttachmentsLastEditedByParentContainerRootContainer + - value: attachments,last_edited_by,root_container + name: AttachmentsLastEditedByRootContainer + - value: attachments,parent_article + name: AttachmentsParentArticle + - value: attachments,parent_article,parent_container + name: AttachmentsParentArticleParentContainer + - value: attachments,parent_article,parent_container,root_container + name: AttachmentsParentArticleParentContainerRootContainer + - value: attachments,parent_article,root_container + name: AttachmentsParentArticleRootContainer + - value: attachments,parent_container + name: AttachmentsParentContainer + - value: attachments,parent_container,root_container + name: AttachmentsParentContainerRootContainer + - value: attachments,root_container + name: AttachmentsRootContainer + - author + - value: author,last_edited_by + name: AuthorLastEditedBy + - value: author,last_edited_by,parent_article + name: AuthorLastEditedByParentArticle + - value: author,last_edited_by,parent_article,parent_container + name: AuthorLastEditedByParentArticleParentContainer + - value: author,last_edited_by,parent_article,parent_container,root_container + name: AuthorLastEditedByParentArticleParentContainerRootContainer + - value: author,last_edited_by,parent_article,root_container + name: AuthorLastEditedByParentArticleRootContainer + - value: author,last_edited_by,parent_container + name: AuthorLastEditedByParentContainer + - value: author,last_edited_by,parent_container,root_container + name: AuthorLastEditedByParentContainerRootContainer + - value: author,last_edited_by,root_container + name: AuthorLastEditedByRootContainer + - value: author,parent_article + name: AuthorParentArticle + - value: author,parent_article,parent_container + name: AuthorParentArticleParentContainer + - value: author,parent_article,parent_container,root_container + name: AuthorParentArticleParentContainerRootContainer + - value: author,parent_article,root_container + name: AuthorParentArticleRootContainer + - value: author,parent_container + name: AuthorParentContainer + - value: author,parent_container,root_container + name: AuthorParentContainerRootContainer + - value: author,root_container + name: AuthorRootContainer + - last_edited_by + - value: last_edited_by,parent_article + name: LastEditedByParentArticle + - value: last_edited_by,parent_article,parent_container + name: LastEditedByParentArticleParentContainer + - value: last_edited_by,parent_article,parent_container,root_container + name: LastEditedByParentArticleParentContainerRootContainer + - value: last_edited_by,parent_article,root_container + name: LastEditedByParentArticleRootContainer + - value: last_edited_by,parent_container + name: LastEditedByParentContainer + - value: last_edited_by,parent_container,root_container + name: LastEditedByParentContainerRootContainer + - value: last_edited_by,root_container + name: LastEditedByRootContainer + - parent_article + - value: parent_article,parent_container + name: ParentArticleParentContainer + - value: parent_article,parent_container,root_container + name: ParentArticleParentContainerRootContainer + - value: parent_article,root_container + name: ParentArticleRootContainer + - parent_container + - value: parent_container,root_container + name: ParentContainerRootContainer + - permissions + - value: permissions,attachments + name: PermissionsAttachments + - value: permissions,attachments,author + name: PermissionsAttachmentsAuthor + - value: permissions,attachments,author,last_edited_by + name: PermissionsAttachmentsAuthorLastEditedBy + - value: permissions,attachments,author,last_edited_by,parent_article + name: PermissionsAttachmentsAuthorLastEditedByParentArticle + - value: >- + permissions,attachments,author,last_edited_by,parent_article,parent_container + name: PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container + name: >- + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_article,root_container + name: PermissionsAttachmentsAuthorLastEditedByParentArticleRootContainer + - value: permissions,attachments,author,last_edited_by,parent_container + name: PermissionsAttachmentsAuthorLastEditedByParentContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_container,root_container + name: PermissionsAttachmentsAuthorLastEditedByParentContainerRootContainer + - value: permissions,attachments,author,last_edited_by,root_container + name: PermissionsAttachmentsAuthorLastEditedByRootContainer + - value: permissions,attachments,author,parent_article + name: PermissionsAttachmentsAuthorParentArticle + - value: permissions,attachments,author,parent_article,parent_container + name: PermissionsAttachmentsAuthorParentArticleParentContainer + - value: >- + permissions,attachments,author,parent_article,parent_container,root_container + name: PermissionsAttachmentsAuthorParentArticleParentContainerRootContainer + - value: permissions,attachments,author,parent_article,root_container + name: PermissionsAttachmentsAuthorParentArticleRootContainer + - value: permissions,attachments,author,parent_container + name: PermissionsAttachmentsAuthorParentContainer + - value: permissions,attachments,author,parent_container,root_container + name: PermissionsAttachmentsAuthorParentContainerRootContainer + - value: permissions,attachments,author,root_container + name: PermissionsAttachmentsAuthorRootContainer + - value: permissions,attachments,last_edited_by + name: PermissionsAttachmentsLastEditedBy + - value: permissions,attachments,last_edited_by,parent_article + name: PermissionsAttachmentsLastEditedByParentArticle + - value: permissions,attachments,last_edited_by,parent_article,parent_container + name: PermissionsAttachmentsLastEditedByParentArticleParentContainer + - value: >- + permissions,attachments,last_edited_by,parent_article,parent_container,root_container + name: >- + PermissionsAttachmentsLastEditedByParentArticleParentContainerRootContainer + - value: permissions,attachments,last_edited_by,parent_article,root_container + name: PermissionsAttachmentsLastEditedByParentArticleRootContainer + - value: permissions,attachments,last_edited_by,parent_container + name: PermissionsAttachmentsLastEditedByParentContainer + - value: permissions,attachments,last_edited_by,parent_container,root_container + name: PermissionsAttachmentsLastEditedByParentContainerRootContainer + - value: permissions,attachments,last_edited_by,root_container + name: PermissionsAttachmentsLastEditedByRootContainer + - value: permissions,attachments,parent_article + name: PermissionsAttachmentsParentArticle + - value: permissions,attachments,parent_article,parent_container + name: PermissionsAttachmentsParentArticleParentContainer + - value: permissions,attachments,parent_article,parent_container,root_container + name: PermissionsAttachmentsParentArticleParentContainerRootContainer + - value: permissions,attachments,parent_article,root_container + name: PermissionsAttachmentsParentArticleRootContainer + - value: permissions,attachments,parent_container + name: PermissionsAttachmentsParentContainer + - value: permissions,attachments,parent_container,root_container + name: PermissionsAttachmentsParentContainerRootContainer + - value: permissions,attachments,root_container + name: PermissionsAttachmentsRootContainer + - value: permissions,author + name: PermissionsAuthor + - value: permissions,author,last_edited_by + name: PermissionsAuthorLastEditedBy + - value: permissions,author,last_edited_by,parent_article + name: PermissionsAuthorLastEditedByParentArticle + - value: permissions,author,last_edited_by,parent_article,parent_container + name: PermissionsAuthorLastEditedByParentArticleParentContainer + - value: >- + permissions,author,last_edited_by,parent_article,parent_container,root_container + name: PermissionsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: permissions,author,last_edited_by,parent_article,root_container + name: PermissionsAuthorLastEditedByParentArticleRootContainer + - value: permissions,author,last_edited_by,parent_container + name: PermissionsAuthorLastEditedByParentContainer + - value: permissions,author,last_edited_by,parent_container,root_container + name: PermissionsAuthorLastEditedByParentContainerRootContainer + - value: permissions,author,last_edited_by,root_container + name: PermissionsAuthorLastEditedByRootContainer + - value: permissions,author,parent_article + name: PermissionsAuthorParentArticle + - value: permissions,author,parent_article,parent_container + name: PermissionsAuthorParentArticleParentContainer + - value: permissions,author,parent_article,parent_container,root_container + name: PermissionsAuthorParentArticleParentContainerRootContainer + - value: permissions,author,parent_article,root_container + name: PermissionsAuthorParentArticleRootContainer + - value: permissions,author,parent_container + name: PermissionsAuthorParentContainer + - value: permissions,author,parent_container,root_container + name: PermissionsAuthorParentContainerRootContainer + - value: permissions,author,root_container + name: PermissionsAuthorRootContainer + - value: permissions,last_edited_by + name: PermissionsLastEditedBy + - value: permissions,last_edited_by,parent_article + name: PermissionsLastEditedByParentArticle + - value: permissions,last_edited_by,parent_article,parent_container + name: PermissionsLastEditedByParentArticleParentContainer + - value: >- + permissions,last_edited_by,parent_article,parent_container,root_container + name: PermissionsLastEditedByParentArticleParentContainerRootContainer + - value: permissions,last_edited_by,parent_article,root_container + name: PermissionsLastEditedByParentArticleRootContainer + - value: permissions,last_edited_by,parent_container + name: PermissionsLastEditedByParentContainer + - value: permissions,last_edited_by,parent_container,root_container + name: PermissionsLastEditedByParentContainerRootContainer + - value: permissions,last_edited_by,root_container + name: PermissionsLastEditedByRootContainer + - value: permissions,parent_article + name: PermissionsParentArticle + - value: permissions,parent_article,parent_container + name: PermissionsParentArticleParentContainer + - value: permissions,parent_article,parent_container,root_container + name: PermissionsParentArticleParentContainerRootContainer + - value: permissions,parent_article,root_container + name: PermissionsParentArticleRootContainer + - value: permissions,parent_container + name: PermissionsParentContainer + - value: permissions,parent_container,root_container + name: PermissionsParentContainerRootContainer + - value: permissions,root_container + name: PermissionsRootContainer + - root_container + source: + openapi: openapi/openapi.yml + ArticlesRetrieveRequestExpand: + enum: + - attachments + - value: attachments,author + name: AttachmentsAuthor + - value: attachments,author,last_edited_by + name: AttachmentsAuthorLastEditedBy + - value: attachments,author,last_edited_by,parent_article + name: AttachmentsAuthorLastEditedByParentArticle + - value: attachments,author,last_edited_by,parent_article,parent_container + name: AttachmentsAuthorLastEditedByParentArticleParentContainer + - value: >- + attachments,author,last_edited_by,parent_article,parent_container,root_container + name: AttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: attachments,author,last_edited_by,parent_article,root_container + name: AttachmentsAuthorLastEditedByParentArticleRootContainer + - value: attachments,author,last_edited_by,parent_container + name: AttachmentsAuthorLastEditedByParentContainer + - value: attachments,author,last_edited_by,parent_container,root_container + name: AttachmentsAuthorLastEditedByParentContainerRootContainer + - value: attachments,author,last_edited_by,root_container + name: AttachmentsAuthorLastEditedByRootContainer + - value: attachments,author,parent_article + name: AttachmentsAuthorParentArticle + - value: attachments,author,parent_article,parent_container + name: AttachmentsAuthorParentArticleParentContainer + - value: attachments,author,parent_article,parent_container,root_container + name: AttachmentsAuthorParentArticleParentContainerRootContainer + - value: attachments,author,parent_article,root_container + name: AttachmentsAuthorParentArticleRootContainer + - value: attachments,author,parent_container + name: AttachmentsAuthorParentContainer + - value: attachments,author,parent_container,root_container + name: AttachmentsAuthorParentContainerRootContainer + - value: attachments,author,root_container + name: AttachmentsAuthorRootContainer + - value: attachments,last_edited_by + name: AttachmentsLastEditedBy + - value: attachments,last_edited_by,parent_article + name: AttachmentsLastEditedByParentArticle + - value: attachments,last_edited_by,parent_article,parent_container + name: AttachmentsLastEditedByParentArticleParentContainer + - value: >- + attachments,last_edited_by,parent_article,parent_container,root_container + name: AttachmentsLastEditedByParentArticleParentContainerRootContainer + - value: attachments,last_edited_by,parent_article,root_container + name: AttachmentsLastEditedByParentArticleRootContainer + - value: attachments,last_edited_by,parent_container + name: AttachmentsLastEditedByParentContainer + - value: attachments,last_edited_by,parent_container,root_container + name: AttachmentsLastEditedByParentContainerRootContainer + - value: attachments,last_edited_by,root_container + name: AttachmentsLastEditedByRootContainer + - value: attachments,parent_article + name: AttachmentsParentArticle + - value: attachments,parent_article,parent_container + name: AttachmentsParentArticleParentContainer + - value: attachments,parent_article,parent_container,root_container + name: AttachmentsParentArticleParentContainerRootContainer + - value: attachments,parent_article,root_container + name: AttachmentsParentArticleRootContainer + - value: attachments,parent_container + name: AttachmentsParentContainer + - value: attachments,parent_container,root_container + name: AttachmentsParentContainerRootContainer + - value: attachments,root_container + name: AttachmentsRootContainer + - author + - value: author,last_edited_by + name: AuthorLastEditedBy + - value: author,last_edited_by,parent_article + name: AuthorLastEditedByParentArticle + - value: author,last_edited_by,parent_article,parent_container + name: AuthorLastEditedByParentArticleParentContainer + - value: author,last_edited_by,parent_article,parent_container,root_container + name: AuthorLastEditedByParentArticleParentContainerRootContainer + - value: author,last_edited_by,parent_article,root_container + name: AuthorLastEditedByParentArticleRootContainer + - value: author,last_edited_by,parent_container + name: AuthorLastEditedByParentContainer + - value: author,last_edited_by,parent_container,root_container + name: AuthorLastEditedByParentContainerRootContainer + - value: author,last_edited_by,root_container + name: AuthorLastEditedByRootContainer + - value: author,parent_article + name: AuthorParentArticle + - value: author,parent_article,parent_container + name: AuthorParentArticleParentContainer + - value: author,parent_article,parent_container,root_container + name: AuthorParentArticleParentContainerRootContainer + - value: author,parent_article,root_container + name: AuthorParentArticleRootContainer + - value: author,parent_container + name: AuthorParentContainer + - value: author,parent_container,root_container + name: AuthorParentContainerRootContainer + - value: author,root_container + name: AuthorRootContainer + - last_edited_by + - value: last_edited_by,parent_article + name: LastEditedByParentArticle + - value: last_edited_by,parent_article,parent_container + name: LastEditedByParentArticleParentContainer + - value: last_edited_by,parent_article,parent_container,root_container + name: LastEditedByParentArticleParentContainerRootContainer + - value: last_edited_by,parent_article,root_container + name: LastEditedByParentArticleRootContainer + - value: last_edited_by,parent_container + name: LastEditedByParentContainer + - value: last_edited_by,parent_container,root_container + name: LastEditedByParentContainerRootContainer + - value: last_edited_by,root_container + name: LastEditedByRootContainer + - parent_article + - value: parent_article,parent_container + name: ParentArticleParentContainer + - value: parent_article,parent_container,root_container + name: ParentArticleParentContainerRootContainer + - value: parent_article,root_container + name: ParentArticleRootContainer + - parent_container + - value: parent_container,root_container + name: ParentContainerRootContainer + - permissions + - value: permissions,attachments + name: PermissionsAttachments + - value: permissions,attachments,author + name: PermissionsAttachmentsAuthor + - value: permissions,attachments,author,last_edited_by + name: PermissionsAttachmentsAuthorLastEditedBy + - value: permissions,attachments,author,last_edited_by,parent_article + name: PermissionsAttachmentsAuthorLastEditedByParentArticle + - value: >- + permissions,attachments,author,last_edited_by,parent_article,parent_container + name: PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container + name: >- + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_article,root_container + name: PermissionsAttachmentsAuthorLastEditedByParentArticleRootContainer + - value: permissions,attachments,author,last_edited_by,parent_container + name: PermissionsAttachmentsAuthorLastEditedByParentContainer + - value: >- + permissions,attachments,author,last_edited_by,parent_container,root_container + name: PermissionsAttachmentsAuthorLastEditedByParentContainerRootContainer + - value: permissions,attachments,author,last_edited_by,root_container + name: PermissionsAttachmentsAuthorLastEditedByRootContainer + - value: permissions,attachments,author,parent_article + name: PermissionsAttachmentsAuthorParentArticle + - value: permissions,attachments,author,parent_article,parent_container + name: PermissionsAttachmentsAuthorParentArticleParentContainer + - value: >- + permissions,attachments,author,parent_article,parent_container,root_container + name: PermissionsAttachmentsAuthorParentArticleParentContainerRootContainer + - value: permissions,attachments,author,parent_article,root_container + name: PermissionsAttachmentsAuthorParentArticleRootContainer + - value: permissions,attachments,author,parent_container + name: PermissionsAttachmentsAuthorParentContainer + - value: permissions,attachments,author,parent_container,root_container + name: PermissionsAttachmentsAuthorParentContainerRootContainer + - value: permissions,attachments,author,root_container + name: PermissionsAttachmentsAuthorRootContainer + - value: permissions,attachments,last_edited_by + name: PermissionsAttachmentsLastEditedBy + - value: permissions,attachments,last_edited_by,parent_article + name: PermissionsAttachmentsLastEditedByParentArticle + - value: permissions,attachments,last_edited_by,parent_article,parent_container + name: PermissionsAttachmentsLastEditedByParentArticleParentContainer + - value: >- + permissions,attachments,last_edited_by,parent_article,parent_container,root_container + name: >- + PermissionsAttachmentsLastEditedByParentArticleParentContainerRootContainer + - value: permissions,attachments,last_edited_by,parent_article,root_container + name: PermissionsAttachmentsLastEditedByParentArticleRootContainer + - value: permissions,attachments,last_edited_by,parent_container + name: PermissionsAttachmentsLastEditedByParentContainer + - value: permissions,attachments,last_edited_by,parent_container,root_container + name: PermissionsAttachmentsLastEditedByParentContainerRootContainer + - value: permissions,attachments,last_edited_by,root_container + name: PermissionsAttachmentsLastEditedByRootContainer + - value: permissions,attachments,parent_article + name: PermissionsAttachmentsParentArticle + - value: permissions,attachments,parent_article,parent_container + name: PermissionsAttachmentsParentArticleParentContainer + - value: permissions,attachments,parent_article,parent_container,root_container + name: PermissionsAttachmentsParentArticleParentContainerRootContainer + - value: permissions,attachments,parent_article,root_container + name: PermissionsAttachmentsParentArticleRootContainer + - value: permissions,attachments,parent_container + name: PermissionsAttachmentsParentContainer + - value: permissions,attachments,parent_container,root_container + name: PermissionsAttachmentsParentContainerRootContainer + - value: permissions,attachments,root_container + name: PermissionsAttachmentsRootContainer + - value: permissions,author + name: PermissionsAuthor + - value: permissions,author,last_edited_by + name: PermissionsAuthorLastEditedBy + - value: permissions,author,last_edited_by,parent_article + name: PermissionsAuthorLastEditedByParentArticle + - value: permissions,author,last_edited_by,parent_article,parent_container + name: PermissionsAuthorLastEditedByParentArticleParentContainer + - value: >- + permissions,author,last_edited_by,parent_article,parent_container,root_container + name: PermissionsAuthorLastEditedByParentArticleParentContainerRootContainer + - value: permissions,author,last_edited_by,parent_article,root_container + name: PermissionsAuthorLastEditedByParentArticleRootContainer + - value: permissions,author,last_edited_by,parent_container + name: PermissionsAuthorLastEditedByParentContainer + - value: permissions,author,last_edited_by,parent_container,root_container + name: PermissionsAuthorLastEditedByParentContainerRootContainer + - value: permissions,author,last_edited_by,root_container + name: PermissionsAuthorLastEditedByRootContainer + - value: permissions,author,parent_article + name: PermissionsAuthorParentArticle + - value: permissions,author,parent_article,parent_container + name: PermissionsAuthorParentArticleParentContainer + - value: permissions,author,parent_article,parent_container,root_container + name: PermissionsAuthorParentArticleParentContainerRootContainer + - value: permissions,author,parent_article,root_container + name: PermissionsAuthorParentArticleRootContainer + - value: permissions,author,parent_container + name: PermissionsAuthorParentContainer + - value: permissions,author,parent_container,root_container + name: PermissionsAuthorParentContainerRootContainer + - value: permissions,author,root_container + name: PermissionsAuthorRootContainer + - value: permissions,last_edited_by + name: PermissionsLastEditedBy + - value: permissions,last_edited_by,parent_article + name: PermissionsLastEditedByParentArticle + - value: permissions,last_edited_by,parent_article,parent_container + name: PermissionsLastEditedByParentArticleParentContainer + - value: >- + permissions,last_edited_by,parent_article,parent_container,root_container + name: PermissionsLastEditedByParentArticleParentContainerRootContainer + - value: permissions,last_edited_by,parent_article,root_container + name: PermissionsLastEditedByParentArticleRootContainer + - value: permissions,last_edited_by,parent_container + name: PermissionsLastEditedByParentContainer + - value: permissions,last_edited_by,parent_container,root_container + name: PermissionsLastEditedByParentContainerRootContainer + - value: permissions,last_edited_by,root_container + name: PermissionsLastEditedByRootContainer + - value: permissions,parent_article + name: PermissionsParentArticle + - value: permissions,parent_article,parent_container + name: PermissionsParentArticleParentContainer + - value: permissions,parent_article,parent_container,root_container + name: PermissionsParentArticleParentContainerRootContainer + - value: permissions,parent_article,root_container + name: PermissionsParentArticleRootContainer + - value: permissions,parent_container + name: PermissionsParentContainer + - value: permissions,parent_container,root_container + name: PermissionsParentContainerRootContainer + - value: permissions,root_container + name: PermissionsRootContainer + - root_container + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/articles + method: GET + auth: true + docs: Returns a list of `Article` objects. + source: + openapi: openapi/openapi.yml + request: + name: ArticlesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_article_id: + type: optional + docs: >- + If provided, will only return sub articles of the + parent_article_id. + validation: + format: uuid + parent_container_id: + type: optional + docs: >- + If provided, will only return sub articles of the + parent_container_id. + validation: + format: uuid + remote_id: + type: optional + docs: The API provider's ID for the given object. + type: + type: optional + docs: If provided, will only return articles of the given type. + response: + docs: '' + type: root.PaginatedArticleList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Test Article + description: >- + This article describes how Merge is the #1 player in the + Unified API space + author: author + last_edited_by: last_edited_by + visibility: PUBLIC + article_content_download_url: >- + https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55 + checksum: >- + b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55 + article_url: myworkspace.atlassian.net/wiki/test-article + status: DRAFT + type: PAGE + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' + parent_article: parent_article + parent_container: parent_container + root_container: root_container + permissions: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + type: USER + roles: + - OWNER + attachments: + - 640b80b-fac9-409f-aa19-1f9221aec445 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /articles + data: + - Varies by platform + retrieve: + path: /knowledgebase/v1/articles/{id} + method: GET + auth: true + docs: Returns an `Article` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ArticlesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Article + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Test Article + description: >- + This article describes how Merge is the #1 player in the Unified + API space + author: author + last_edited_by: last_edited_by + visibility: PUBLIC + article_content_download_url: >- + https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55 + checksum: b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55 + article_url: myworkspace.atlassian.net/wiki/test-article + status: DRAFT + type: PAGE + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' + parent_article: parent_article + parent_container: parent_container + root_container: root_container + permissions: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + type: USER + roles: + - OWNER + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + attachments: + - 640b80b-fac9-409f-aa19-1f9221aec445 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /articles + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/asyncPassthrough.yml b/.mock/definition/knowledgebase/asyncPassthrough.yml new file mode 100644 index 000000000..12e4aab74 --- /dev/null +++ b/.mock/definition/knowledgebase/asyncPassthrough.yml @@ -0,0 +1,72 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /knowledgebase/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /knowledgebase/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: + X-Account-Token: X-Account-Token + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/attachments.yml b/.mock/definition/knowledgebase/attachments.yml new file mode 100644 index 000000000..f28261616 --- /dev/null +++ b/.mock/definition/knowledgebase/attachments.yml @@ -0,0 +1,144 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/attachments + method: GET + auth: true + docs: Returns a list of `Attachment` objects. + source: + openapi: openapi/openapi.yml + request: + name: AttachmentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAttachmentList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Article spec + description: This is an example attachment. + attachment_url: https://example.com/attachments/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + retrieve: + path: /knowledgebase/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `Attachment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Attachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Article spec + description: This is an example attachment. + attachment_url: https://example.com/attachments/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/auditTrail.yml b/.mock/definition/knowledgebase/auditTrail.yml new file mode 100644 index 000000000..a3a1fa8b9 --- /dev/null +++ b/.mock/definition/knowledgebase/auditTrail.yml @@ -0,0 +1,98 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + If included, will only include events with the given event type. + Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, + `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, + `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, + `CREATED_DESTINATION`, `DELETED_DESTINATION`, + `CHANGED_DESTINATION`, `CHANGED_SCOPES`, + `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, + `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, + `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, + `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, + `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, + `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, + `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, + `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, + `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, + `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, + `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, + `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, + `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/availableActions.yml b/.mock/definition/knowledgebase/availableActions.yml new file mode 100644 index 000000000..d45ad3f51 --- /dev/null +++ b/.mock/definition/knowledgebase/availableActions.yml @@ -0,0 +1,51 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /knowledgebase/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/containers.yml b/.mock/definition/knowledgebase/containers.yml new file mode 100644 index 000000000..814ad7b90 --- /dev/null +++ b/.mock/definition/knowledgebase/containers.yml @@ -0,0 +1,244 @@ +types: + ContainersListRequestExpand: + enum: + - parent_article + - value: parent_article,parent_container + name: ParentArticleParentContainer + - parent_container + - permissions + - value: permissions,parent_article + name: PermissionsParentArticle + - value: permissions,parent_article,parent_container + name: PermissionsParentArticleParentContainer + - value: permissions,parent_container + name: PermissionsParentContainer + source: + openapi: openapi/openapi.yml + ContainersRetrieveRequestExpand: + enum: + - parent_article + - value: parent_article,parent_container + name: ParentArticleParentContainer + - parent_container + - permissions + - value: permissions,parent_article + name: PermissionsParentArticle + - value: permissions,parent_article,parent_container + name: PermissionsParentArticleParentContainer + - value: permissions,parent_container + name: PermissionsParentContainer + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/containers + method: GET + auth: true + docs: Returns a list of `Container` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContainersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_article_id: + type: optional + docs: >- + If provided, will only return sub containers of the + parent_article_id. + validation: + format: uuid + parent_container_id: + type: optional + docs: >- + If provided, will only return sub containers of the + parent_container_id. + validation: + format: uuid + remote_id: + type: optional + docs: The API provider's ID for the given object. + type: + type: optional + docs: If provided, will only return containers of the given type. + response: + docs: '' + type: root.PaginatedContainerList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Test Container + description: >- + This folder contains articles that describe how Merge is the + #1 player in the Unified API space + status: DRAFT + container_url: myworkspace.atlassian.net/wiki/test-container + type: FOLDER + visibility: PUBLIC + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' + parent_article: parent_article + parent_container: 8e889422-e086-42dc-b99e-24d732039b0b + permissions: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + type: USER + roles: + - OWNER + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /containers + data: + - Varies by platform + retrieve: + path: /knowledgebase/v1/containers/{id} + method: GET + auth: true + docs: Returns a `Container` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ContainersRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Container + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Test Container + description: >- + This folder contains articles that describe how Merge is the #1 + player in the Unified API space + status: DRAFT + container_url: myworkspace.atlassian.net/wiki/test-container + type: FOLDER + visibility: PUBLIC + remote_created_at: '2021-09-15T00:00:00Z' + remote_updated_at: '2021-09-16T00:00:00Z' + parent_article: parent_article + parent_container: 8e889422-e086-42dc-b99e-24d732039b0b + permissions: + - id: 31ce489c-asdf-68b1-754r-629f799f7123 + remote_id: '102895' + created_at: '2020-03-31T00:00:00Z' + modified_at: '2020-06-20T00:00:00Z' + user: 21ce474c-asdf-34a2-754r-629f799f7d12 + type: USER + roles: + - OWNER + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /containers + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/deleteAccount.yml b/.mock/definition/knowledgebase/deleteAccount.yml new file mode 100644 index 000000000..fb61395f4 --- /dev/null +++ b/.mock/definition/knowledgebase/deleteAccount.yml @@ -0,0 +1,16 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /knowledgebase/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: + X-Account-Token: X-Account-Token + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/fieldMapping.yml b/.mock/definition/knowledgebase/fieldMapping.yml new file mode 100644 index 000000000..311cd4289 --- /dev/null +++ b/.mock/definition/knowledgebase/fieldMapping.yml @@ -0,0 +1,546 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /knowledgebase/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + Container: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Article: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Attachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + field_mappings_create: + path: /knowledgebase/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + 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 + field_mappings_destroy: + path: /knowledgebase/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: + X-Account-Token: X-Account-Token + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + 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 + field_mappings_partial_update: + path: /knowledgebase/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + jmes_path: + type: optional + docs: >- + JMES path to specify json query expression to be used on field + mapping. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: + X-Account-Token: X-Account-Token + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + jmes_path: '[0].example_jmes_path' + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + 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 + remote_fields_retrieve: + path: /knowledgebase/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + Container: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Article: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Attachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /knowledgebase/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + Container: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Article: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Attachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/forceResync.yml b/.mock/definition/knowledgebase/forceResync.yml new file mode 100644 index 000000000..22f607959 --- /dev/null +++ b/.mock/definition/knowledgebase/forceResync.yml @@ -0,0 +1,38 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /knowledgebase/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + - model_name: Article + model_id: knowledgebase.KnowledgeBaseArticle + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/generateKey.yml b/.mock/definition/knowledgebase/generateKey.yml new file mode 100644 index 000000000..28384f36e --- /dev/null +++ b/.mock/definition/knowledgebase/generateKey.yml @@ -0,0 +1,38 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /knowledgebase/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/groups.yml b/.mock/definition/knowledgebase/groups.yml new file mode 100644 index 000000000..392f8af5e --- /dev/null +++ b/.mock/definition/knowledgebase/groups.yml @@ -0,0 +1,175 @@ +types: + GroupsListRequestExpand: + enum: + - parent_group + - users + - value: users,parent_group + name: UsersParentGroup + source: + openapi: openapi/openapi.yml + GroupsRetrieveRequestExpand: + enum: + - parent_group + - users + - value: users,parent_group + name: UsersParentGroup + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/groups + method: GET + auth: true + docs: Returns a list of `Group` objects. + source: + openapi: openapi/openapi.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedGroupList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_group: parent_group + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + retrieve: + path: /knowledgebase/v1/groups/{id} + method: GET + auth: true + docs: Returns a `Group` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Group + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_group: parent_group + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/issues.yml b/.mock/definition/knowledgebase/issues.yml new file mode 100644 index 000000000..c2f6d4d82 --- /dev/null +++ b/.mock/definition/knowledgebase/issues.yml @@ -0,0 +1,135 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /knowledgebase/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: '[object Object]' + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/linkToken.yml b/.mock/definition/knowledgebase/linkToken.yml new file mode 100644 index 000000000..0a256905d --- /dev/null +++ b/.mock/definition/knowledgebase/linkToken.yml @@ -0,0 +1,154 @@ +imports: + root: __package__.yml +types: + EndUserDetailsRequestLanguage: + discriminated: false + docs: >- + The following subset of IETF language tags can be used to configure + localization. + + + * `en` - en + + * `de` - de + union: + - root.LanguageEnum + - string + source: + openapi: openapi/openapi.yml + inline: true +service: + auth: false + base-path: '' + endpoints: + create: + path: /knowledgebase/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + When creating a Link Token, you can set permissions for Common + Models that will apply to the account that is going to be + linked. Any model or field not specified in link token payload + will default to existing settings. + language: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/linkedAccounts.yml b/.mock/definition/knowledgebase/linkedAccounts.yml new file mode 100644 index 000000000..3b7b13a02 --- /dev/null +++ b/.mock/definition/knowledgebase/linkedAccounts.yml @@ -0,0 +1,157 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - knowledgebase + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `knowledgebase`, `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + + * `knowledgebase` - knowledgebase + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: '[object Object]' + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/passthrough.yml b/.mock/definition/knowledgebase/passthrough.yml new file mode 100644 index 000000000..71171a076 --- /dev/null +++ b/.mock/definition/knowledgebase/passthrough.yml @@ -0,0 +1,41 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /knowledgebase/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/regenerateKey.yml b/.mock/definition/knowledgebase/regenerateKey.yml new file mode 100644 index 000000000..a12026267 --- /dev/null +++ b/.mock/definition/knowledgebase/regenerateKey.yml @@ -0,0 +1,38 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /knowledgebase/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/scopes.yml b/.mock/definition/knowledgebase/scopes.yml new file mode 100644 index 000000000..80d5a8bbe --- /dev/null +++ b/.mock/definition/knowledgebase/scopes.yml @@ -0,0 +1,164 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /knowledgebase/v1/default-scopes + method: GET + auth: true + docs: >- + Get the default permissions for Merge Common Models and fields across + all Linked Accounts of a given category. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: '[object Object]' + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /knowledgebase/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /knowledgebase/v1/linked-account-scopes + method: POST + auth: true + docs: >- + Update permissions for any Common Model or field for a single Linked + Account. Any Scopes not set in this POST request will inherit the + default Scopes. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/syncStatus.yml b/.mock/definition/knowledgebase/syncStatus.yml new file mode 100644 index 000000000..0554650b4 --- /dev/null +++ b/.mock/definition/knowledgebase/syncStatus.yml @@ -0,0 +1,58 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Article + model_id: knowledgebase.KnowledgeBaseArticle + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/users.yml b/.mock/definition/knowledgebase/users.yml new file mode 100644 index 000000000..e5c4f8ee6 --- /dev/null +++ b/.mock/definition/knowledgebase/users.yml @@ -0,0 +1,134 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - query-parameters: + cursor: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + headers: + X-Account-Token: X-Account-Token + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + retrieve: + path: /knowledgebase/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: + X-Account-Token: X-Account-Token + response: + body: + id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/knowledgebase/webhookReceivers.yml b/.mock/definition/knowledgebase/webhookReceivers.yml new file mode 100644 index 000000000..a3585da3e --- /dev/null +++ b/.mock/definition/knowledgebase/webhookReceivers.yml @@ -0,0 +1,63 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /knowledgebase/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: + X-Account-Token: X-Account-Token + response: + body: + - event: event + is_active: true + key: key + create: + path: /knowledgebase/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: + X-Account-Token: X-Account-Token + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/__package__.yml b/.mock/definition/ticketing/__package__.yml index 640595be6..a9ceb98e5 100644 --- a/.mock/definition/ticketing/__package__.yml +++ b/.mock/definition/ticketing/__package__.yml @@ -843,6 +843,18 @@ types: parent_collection: type: optional docs: The parent collection for this collection. + collection_url: + type: optional + docs: The 3rd party url of the Collection. + validation: + format: uri + maxLength: 2000 + remote_created_at: + type: optional + docs: When the third party's collection was created. + remote_updated_at: + type: optional + docs: When the third party's collection was updated. remote_was_deleted: type: optional docs: >- diff --git a/.mock/definition/ticketing/collections.yml b/.mock/definition/ticketing/collections.yml index 0861c8255..573597376 100644 --- a/.mock/definition/ticketing/collections.yml +++ b/.mock/definition/ticketing/collections.yml @@ -61,6 +61,9 @@ service: docs: >- If provided, only objects synced by Merge before this date time will be returned. + name: + type: optional + docs: If provided, will only return collections with this name. page_size: type: optional docs: Number of results to return per page. @@ -105,6 +108,9 @@ service: access_level: PRIVATE collection_type: LIST parent_collection: parent_collection + collection_url: https://example.com + remote_created_at: '2022-01-01T00:00:00Z' + remote_updated_at: '2022-01-01T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: @@ -237,6 +243,9 @@ service: access_level: PRIVATE collection_type: LIST parent_collection: parent_collection + collection_url: https://example.com + remote_created_at: '2022-01-01T00:00:00Z' + remote_updated_at: '2022-01-01T00:00:00Z' remote_was_deleted: true field_mappings: organization_defined_targets: diff --git a/.mock/definition/ticketing/contacts.yml b/.mock/definition/ticketing/contacts.yml index 6bc83943d..5296646e0 100644 --- a/.mock/definition/ticketing/contacts.yml +++ b/.mock/definition/ticketing/contacts.yml @@ -25,6 +25,9 @@ service: cursor: type: optional docs: The pagination cursor value. + email_address: + type: optional + docs: If provided, will only return Contacts that match this email. expand: type: optional> docs: >- diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml index 2d4a7ec5c..74e702843 100644 --- a/.mock/definition/ticketing/tickets.yml +++ b/.mock/definition/ticketing/tickets.yml @@ -1208,6 +1208,9 @@ service: docs: >- If provided, only objects synced by Merge before this date time will be returned. + name: + type: optional + docs: If provided, will only return tickets with this name. page_size: type: optional docs: Number of results to return per page. diff --git a/package.json b/package.json index 3107d52b5..5fdc87491 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mergeapi/merge-node-client", - "version": "2.2.0", + "version": "2.3.0", "private": false, "repository": "github:merge-api/merge-node-client", "main": "./index.js", diff --git a/reference.md b/reference.md index 87e66a192..11da635d8 100644 --- a/reference.md +++ b/reference.md @@ -4845,9 +4845,9 @@ await client.ats.webhookReceivers.create({ -## Filestorage AccountDetails +## Crm AccountDetails -
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails +
client.crm.accountDetails.retrieve() -> Merge.AccountDetails
@@ -4875,7 +4875,7 @@ Get details for a linked account.
```typescript -await client.filestorage.accountDetails.retrieve(); +await client.crm.accountDetails.retrieve(); ```
@@ -4902,9 +4902,9 @@ await client.filestorage.accountDetails.retrieve();
-## Filestorage AccountToken +## Crm AccountToken -
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.crm.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.filestorage.accountToken.retrieve("public_token"); +await client.crm.accountToken.retrieve("public_token"); ```
@@ -4967,9 +4967,9 @@ await client.filestorage.accountToken.retrieve("public_token");
-## Filestorage AsyncPassthrough +## Crm Accounts -
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList
@@ -4981,7 +4981,7 @@ await client.filestorage.accountToken.retrieve("public_token");
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns a list of `Account` objects.
@@ -4997,9 +4997,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.accounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -5016,7 +5015,7 @@ await client.filestorage.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.crm.AccountsListRequest`
@@ -5024,7 +5023,7 @@ await client.filestorage.asyncPassthrough.create({
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -5035,7 +5034,7 @@ await client.filestorage.asyncPassthrough.create({
-
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse
@@ -5047,7 +5046,7 @@ await client.filestorage.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Creates an `Account` object with the given values.
@@ -5063,7 +5062,9 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.crm.accounts.create({ + model: {}, +}); ```
@@ -5079,7 +5080,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.crm.CrmAccountEndpointRequest`
@@ -5087,7 +5088,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -5098,9 +5099,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-## Filestorage AuditTrail - -
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account
@@ -5112,7 +5111,7 @@ await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id
-Gets a list of audit trail events. +Returns an `Account` object with the given `id`.
@@ -5128,9 +5127,7 @@ Gets a list of audit trail events.
```typescript -await client.filestorage.auditTrail.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.accounts.retrieve("id"); ```
@@ -5146,7 +5143,7 @@ await client.filestorage.auditTrail.list({
-**request:** `Merge.filestorage.AuditTrailListRequest` +**id:** `string`
@@ -5154,7 +5151,15 @@ await client.filestorage.auditTrail.list({
-**requestOptions:** `AuditTrail.RequestOptions` +**request:** `Merge.crm.AccountsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -5165,9 +5170,7 @@ await client.filestorage.auditTrail.list({
-## Filestorage AvailableActions - -
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions +
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse
@@ -5179,7 +5182,7 @@ await client.filestorage.auditTrail.list({
-Returns a list of models and actions available for an account. +Updates an `Account` object with the given `id`.
@@ -5195,7 +5198,9 @@ Returns a list of models and actions available for an account.
```typescript -await client.filestorage.availableActions.retrieve(); +await client.crm.accounts.partialUpdate("id", { + model: {}, +}); ```
@@ -5211,7 +5216,23 @@ await client.filestorage.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -5222,9 +5243,7 @@ await client.filestorage.availableActions.retrieve();
-## Filestorage Scopes - -
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -5236,7 +5255,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 metadata for `CRMAccount` PATCHs.
@@ -5252,7 +5271,7 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.filestorage.scopes.defaultScopesRetrieve(); +await client.crm.accounts.metaPatchRetrieve("id"); ```
@@ -5268,7 +5287,15 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Accounts.RequestOptions`
@@ -5279,7 +5306,7 @@ await client.filestorage.scopes.defaultScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse
@@ -5291,7 +5318,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 `CRMAccount` POSTs.
@@ -5307,7 +5334,7 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.filestorage.scopes.linkedAccountScopesRetrieve(); +await client.crm.accounts.metaPostRetrieve(); ```
@@ -5323,7 +5350,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -5334,7 +5361,7 @@ await client.filestorage.scopes.linkedAccountScopesRetrieve();
-
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -5346,7 +5373,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.
@@ -5362,32 +5389,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.accounts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -5404,7 +5407,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest` +**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest`
@@ -5412,7 +5415,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `Accounts.RequestOptions`
@@ -5423,9 +5426,9 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-## Filestorage DeleteAccount +## Crm AsyncPassthrough -
client.filestorage.deleteAccount.delete() -> void +
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -5437,7 +5440,7 @@ await client.filestorage.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -5453,7 +5456,10 @@ Delete a linked account.
```typescript -await client.filestorage.deleteAccount.delete(); +await client.crm.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -5469,7 +5475,15 @@ await client.filestorage.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -5480,9 +5494,7 @@ await client.filestorage.deleteAccount.delete();
-## Filestorage Drives - -
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList +
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -5494,7 +5506,7 @@ await client.filestorage.deleteAccount.delete();
-Returns a list of `Drive` objects. +Retrieves data from earlier async-passthrough POST request
@@ -5510,9 +5522,7 @@ Returns a list of `Drive` objects.
```typescript -await client.filestorage.drives.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -5528,7 +5538,7 @@ await client.filestorage.drives.list({
-**request:** `Merge.filestorage.DrivesListRequest` +**asyncPassthroughReceiptId:** `string`
@@ -5536,7 +5546,7 @@ await client.filestorage.drives.list({
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -5547,7 +5557,9 @@ await client.filestorage.drives.list({
-
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive +## Crm AuditTrail + +
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -5559,7 +5571,7 @@ await client.filestorage.drives.list({
-Returns a `Drive` object with the given `id`. +Gets a list of audit trail events.
@@ -5575,7 +5587,9 @@ Returns a `Drive` object with the given `id`.
```typescript -await client.filestorage.drives.retrieve("id"); +await client.crm.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -5591,15 +5605,7 @@ await client.filestorage.drives.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.DrivesRetrieveRequest` +**request:** `Merge.crm.AuditTrailListRequest`
@@ -5607,7 +5613,7 @@ await client.filestorage.drives.retrieve("id");
-**requestOptions:** `Drives.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -5618,9 +5624,9 @@ await client.filestorage.drives.retrieve("id");
-## Filestorage FieldMapping +## Crm AvailableActions -
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.crm.availableActions.retrieve() -> Merge.AvailableActions
@@ -5632,7 +5638,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/). +Returns a list of models and actions available for an account.
@@ -5648,7 +5654,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.filestorage.fieldMapping.fieldMappingsRetrieve(); +await client.crm.availableActions.retrieve(); ```
@@ -5664,15 +5670,7 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.filestorage.FieldMappingsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -5683,7 +5681,9 @@ await client.filestorage.fieldMapping.fieldMappingsRetrieve();
-
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +## Crm Contacts + +
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList
@@ -5695,7 +5695,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 list of `Contact` objects.
@@ -5711,13 +5711,8 @@ 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.contacts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -5734,7 +5729,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.filestorage.CreateFieldMappingRequest` +**request:** `Merge.crm.ContactsListRequest`
@@ -5742,7 +5737,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -5753,7 +5748,7 @@ await client.filestorage.fieldMapping.fieldMappingsCreate({
-
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse
@@ -5765,7 +5760,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. +Creates a `Contact` object with the given values.
@@ -5781,7 +5776,9 @@ 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.contacts.create({ + model: {}, +}); ```
@@ -5797,7 +5794,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.crm.CrmContactEndpointRequest`
@@ -5805,7 +5802,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -5816,7 +5813,7 @@ await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact
@@ -5828,7 +5825,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 `Contact` object with the given `id`.
@@ -5844,7 +5841,7 @@ 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.contacts.retrieve("id"); ```
@@ -5860,7 +5857,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**fieldMappingId:** `string` +**id:** `string`
@@ -5868,7 +5865,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**request:** `Merge.filestorage.PatchedEditFieldMappingRequest` +**request:** `Merge.crm.ContactsRetrieveRequest`
@@ -5876,7 +5873,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -5887,7 +5884,7 @@ await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_
-
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse
@@ -5899,7 +5896,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/). +Updates a `Contact` object with the given `id`.
@@ -5915,7 +5912,9 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.filestorage.fieldMapping.remoteFieldsRetrieve(); +await client.crm.contacts.partialUpdate("id", { + model: {}, +}); ```
@@ -5931,7 +5930,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest` +**id:** `string`
@@ -5939,7 +5938,15 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.crm.PatchedCrmContactEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -5950,7 +5957,7 @@ await client.filestorage.fieldMapping.remoteFieldsRetrieve();
-
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void
@@ -5962,7 +5969,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/). +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.
@@ -5978,7 +5985,9 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.filestorage.fieldMapping.targetFieldsRetrieve(); +await client.crm.contacts.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -5994,7 +6003,23 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Contacts.RequestOptions`
@@ -6005,9 +6030,7 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-## Filestorage Files - -
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList +
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -6019,7 +6042,7 @@ await client.filestorage.fieldMapping.targetFieldsRetrieve();
-Returns a list of `File` objects. +Returns metadata for `CRMContact` PATCHs.
@@ -6035,9 +6058,7 @@ Returns a list of `File` objects.
```typescript -await client.filestorage.files.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.contacts.metaPatchRetrieve("id"); ```
@@ -6053,7 +6074,7 @@ await client.filestorage.files.list({
-**request:** `Merge.filestorage.FilesListRequest` +**id:** `string`
@@ -6061,7 +6082,7 @@ await client.filestorage.files.list({
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -6072,7 +6093,7 @@ await client.filestorage.files.list({
-
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse +
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse
@@ -6084,7 +6105,7 @@ await client.filestorage.files.list({
-Creates a `File` object with the given values. +Returns metadata for `CRMContact` POSTs.
@@ -6100,9 +6121,7 @@ Creates a `File` object with the given values.
```typescript -await client.filestorage.files.create({ - model: {}, -}); +await client.crm.contacts.metaPostRetrieve(); ```
@@ -6118,15 +6137,7 @@ await client.filestorage.files.create({
-**request:** `Merge.filestorage.FileStorageFileEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -6137,7 +6148,7 @@ await client.filestorage.files.create({
-
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_ +
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -6149,7 +6160,7 @@ await client.filestorage.files.create({
-Returns a `File` object with the given `id`. +Returns a list of `RemoteFieldClass` objects.
@@ -6165,7 +6176,9 @@ Returns a `File` object with the given `id`.
```typescript -await client.filestorage.files.retrieve("id"); +await client.crm.contacts.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6181,15 +6194,7 @@ await client.filestorage.files.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.FilesRetrieveRequest` +**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest`
@@ -6197,7 +6202,7 @@ await client.filestorage.files.retrieve("id");
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `Contacts.RequestOptions`
@@ -6208,7 +6213,9 @@ await client.filestorage.files.retrieve("id");
-
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta +## Crm CustomObjectClasses + +
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList
@@ -6220,7 +6227,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 a list of `CustomObjectClass` objects.
@@ -6236,7 +6243,9 @@ Returns metadata to construct an authenticated file download request for a singu
```typescript -await client.filestorage.files.downloadRequestMetaRetrieve("id"); +await client.crm.customObjectClasses.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6252,15 +6261,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest` +**request:** `Merge.crm.CustomObjectClassesListRequest`
@@ -6268,7 +6269,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-**requestOptions:** `Files.RequestOptions` +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -6279,7 +6280,7 @@ await client.filestorage.files.downloadRequestMetaRetrieve("id");
-
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList +
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass
@@ -6291,7 +6292,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 `CustomObjectClass` object with the given `id`.
@@ -6307,9 +6308,7 @@ Returns metadata to construct authenticated file download requests, allowing you
```typescript -await client.filestorage.files.downloadRequestMetaList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.customObjectClasses.retrieve("id"); ```
@@ -6325,7 +6324,7 @@ await client.filestorage.files.downloadRequestMetaList({
-**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest` +**id:** `string`
@@ -6333,7 +6332,15 @@ await client.filestorage.files.downloadRequestMetaList({
-**requestOptions:** `Files.RequestOptions` +**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjectClasses.RequestOptions`
@@ -6344,7 +6351,9 @@ await client.filestorage.files.downloadRequestMetaList({
-
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse +## Crm AssociationTypes + +
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList
@@ -6356,7 +6365,7 @@ await client.filestorage.files.downloadRequestMetaList({
-Returns metadata for `FileStorageFile` POSTs. +Returns a list of `AssociationType` objects.
@@ -6372,7 +6381,9 @@ Returns metadata for `FileStorageFile` POSTs.
```typescript -await client.filestorage.files.metaPostRetrieve(); +await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6388,7 +6399,23 @@ await client.filestorage.files.metaPostRetrieve();
-**requestOptions:** `Files.RequestOptions` +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -6399,9 +6426,7 @@ await client.filestorage.files.metaPostRetrieve();
-## Filestorage Folders - -
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList +
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse
@@ -6413,7 +6438,7 @@ await client.filestorage.files.metaPostRetrieve();
-Returns a list of `Folder` objects. +Creates an `AssociationType` object with the given values.
@@ -6429,8 +6454,20 @@ Returns a list of `Folder` objects.
```typescript -await client.filestorage.folders.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +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", + }, }); ``` @@ -6447,7 +6484,7 @@ await client.filestorage.folders.list({
-**request:** `Merge.filestorage.FoldersListRequest` +**customObjectClassId:** `string`
@@ -6455,7 +6492,15 @@ await client.filestorage.folders.list({
-**requestOptions:** `Folders.RequestOptions` +**request:** `Merge.crm.CrmAssociationTypeEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -6466,7 +6511,7 @@ await client.filestorage.folders.list({
-
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse +
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType
@@ -6478,7 +6523,7 @@ await client.filestorage.folders.list({
-Creates a `Folder` object with the given values. +Returns an `AssociationType` object with the given `id`.
@@ -6494,9 +6539,7 @@ Creates a `Folder` object with the given values.
```typescript -await client.filestorage.folders.create({ - model: {}, -}); +await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); ```
@@ -6512,7 +6555,7 @@ await client.filestorage.folders.create({
-**request:** `Merge.filestorage.FileStorageFolderEndpointRequest` +**customObjectClassId:** `string`
@@ -6520,7 +6563,23 @@ await client.filestorage.folders.create({
-**requestOptions:** `Folders.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `AssociationTypes.RequestOptions`
@@ -6531,7 +6590,7 @@ await client.filestorage.folders.create({
-
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder +
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse
@@ -6543,7 +6602,7 @@ await client.filestorage.folders.create({
-Returns a `Folder` object with the given `id`. +Returns metadata for `CRMAssociationType` POSTs.
@@ -6559,7 +6618,7 @@ Returns a `Folder` object with the given `id`.
```typescript -await client.filestorage.folders.retrieve("id"); +await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); ```
@@ -6575,7 +6634,7 @@ await client.filestorage.folders.retrieve("id");
-**id:** `string` +**customObjectClassId:** `string`
@@ -6583,15 +6642,2385 @@ await client.filestorage.folders.retrieve("id");
-**request:** `Merge.filestorage.FoldersRetrieveRequest` +**requestOptions:** `AssociationTypes.RequestOptions` +
+
-
+ +
+
+ +## Crm CustomObjects + +
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CustomObject` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `CustomObject` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_object_class_id", { + model: { + fields: { + test_field: "hello", + }, + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CrmCustomObjectEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CustomObject` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `CRMCustomObject` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `CustomObjects.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Associations + +
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Association` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customObjectClassId:** `string` + +
+
+ +
+
+ +**objectId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate( + "association_type_id", + "source_class_id", + "source_object_id", + "target_class_id", + "target_object_id", +); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**associationTypeId:** `string` + +
+
+ +
+
+ +**sourceClassId:** `string` + +
+
+ +
+
+ +**sourceObjectId:** `string` + +
+
+ +
+
+ +**targetClassId:** `string` + +
+
+ +
+
+ +**targetObjectId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest` + +
+
+ +
+
+ +**requestOptions:** `Associations.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Scopes + +
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.scopes.defaultScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.scopes.linkedAccountScopesRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes) + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```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, + }, + }, + }, + ], +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+ +
+
+ +**requestOptions:** `Scopes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm DeleteAccount + +
client.crm.deleteAccount.delete() -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.deleteAccount.delete(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `DeleteAccount.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm EngagementTypes + +
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EngagementType` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesListRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EngagementType` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagementTypes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `EngagementTypes.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Engagements + +
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Engagement` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Engagement` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Engagement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Engagement` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.partialUpdate("id", { + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedEngagementEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Engagement` PATCHs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.metaPatchRetrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Engagement` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.engagements.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Engagements.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm FieldMapping + +
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.FieldMappingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```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", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.CreateFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedEditFieldMappingRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.remoteFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.RemoteFieldsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +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/). + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.fieldMapping.targetFieldsRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm GenerateKey + +
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.generateKey.create({ + name: "Remote Deployment Key 1", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Issues + +
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.IssuesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.issues.retrieve(id) -> Merge.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.issues.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**requestOptions:** `Issues.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Crm Leads + +
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Lead` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.create({ ...params }) -> Merge.LeadResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Lead` object with the given values. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.create({ + model: {}, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Lead` object with the given `id`. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.retrieve("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Lead` POSTs. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.metaPostRetrieve(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
-**requestOptions:** `Folders.RequestOptions` +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.leads.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Leads.RequestOptions`
@@ -6602,7 +9031,9 @@ await client.filestorage.folders.retrieve("id");
-
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse +## Crm LinkToken + +
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -6614,7 +9045,7 @@ await client.filestorage.folders.retrieve("id");
-Returns metadata for `FileStorageFolder` POSTs. +Creates a link token to be used when linking a new end user.
@@ -6630,7 +9061,12 @@ Returns metadata for `FileStorageFolder` POSTs.
```typescript -await client.filestorage.folders.metaPostRetrieve(); +await client.crm.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -6646,7 +9082,15 @@ await client.filestorage.folders.metaPostRetrieve();
-**requestOptions:** `Folders.RequestOptions` +**request:** `Merge.crm.EndUserDetailsRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkToken.RequestOptions`
@@ -6657,9 +9101,9 @@ await client.filestorage.folders.metaPostRetrieve();
-## Filestorage GenerateKey +## Crm LinkedAccounts -
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -6671,7 +9115,7 @@ await client.filestorage.folders.metaPostRetrieve();
-Create a remote key. +List linked accounts for your organization.
@@ -6687,8 +9131,8 @@ Create a remote key.
```typescript -await client.filestorage.generateKey.create({ - name: "Remote Deployment Key 1", +await client.crm.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -6705,7 +9149,7 @@ await client.filestorage.generateKey.create({
-**request:** `Merge.filestorage.GenerateRemoteKeyRequest` +**request:** `Merge.crm.LinkedAccountsListRequest`
@@ -6713,7 +9157,7 @@ await client.filestorage.generateKey.create({
-**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -6724,9 +9168,9 @@ await client.filestorage.generateKey.create({
-## Filestorage Groups +## Crm Notes -
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList +
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList
@@ -6738,7 +9182,7 @@ await client.filestorage.generateKey.create({
-Returns a list of `Group` objects. +Returns a list of `Note` objects.
@@ -6754,7 +9198,7 @@ Returns a list of `Group` objects.
```typescript -await client.filestorage.groups.list({ +await client.crm.notes.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -6772,7 +9216,7 @@ await client.filestorage.groups.list({
-**request:** `Merge.filestorage.GroupsListRequest` +**request:** `Merge.crm.NotesListRequest`
@@ -6780,7 +9224,7 @@ await client.filestorage.groups.list({
-**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -6791,7 +9235,7 @@ await client.filestorage.groups.list({
-
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group +
client.crm.notes.create({ ...params }) -> Merge.NoteResponse
@@ -6803,7 +9247,7 @@ await client.filestorage.groups.list({
-Returns a `Group` object with the given `id`. +Creates a `Note` object with the given values.
@@ -6819,7 +9263,9 @@ Returns a `Group` object with the given `id`.
```typescript -await client.filestorage.groups.retrieve("id"); +await client.crm.notes.create({ + model: {}, +}); ```
@@ -6835,7 +9281,7 @@ await client.filestorage.groups.retrieve("id");
-**id:** `string` +**request:** `Merge.crm.NoteEndpointRequest`
@@ -6843,66 +9289,108 @@ await client.filestorage.groups.retrieve("id");
-**request:** `Merge.filestorage.GroupsRetrieveRequest` +**requestOptions:** `Notes.RequestOptions` + +
+
+ +
+
+ +
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note +
+
+ +#### 📝 Description
-**requestOptions:** `Groups.RequestOptions` +
+
+ +Returns a `Note` object with the given `id`.
+#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.crm.notes.retrieve("id"); +``` + +
+
-
-## Filestorage Issues +#### ⚙️ Parameters -
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList
-#### 📝 Description +
+
+ +**id:** `string` + +
+
+**request:** `Merge.crm.NotesRetrieveRequest` + +
+
+
-Gets all issues for Organization. +**requestOptions:** `Notes.RequestOptions`
-#### 🔌 Usage + + +
+
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse
+#### 📝 Description +
-```typescript -await client.filestorage.issues.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); -``` +
+
+ +Returns metadata for `Note` POSTs.
-#### ⚙️ Parameters +#### 🔌 Usage
@@ -6910,15 +9398,24 @@ await client.filestorage.issues.list({
-**request:** `Merge.filestorage.IssuesListRequest` +```typescript +await client.crm.notes.metaPostRetrieve(); +```
+
+
+ +#### ⚙️ Parameters
-**requestOptions:** `Issues.RequestOptions` +
+
+ +**requestOptions:** `Notes.RequestOptions`
@@ -6929,7 +9426,7 @@ await client.filestorage.issues.list({
-
client.filestorage.issues.retrieve(id) -> Merge.Issue +
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -6941,7 +9438,7 @@ await client.filestorage.issues.list({
-Get a specific issue. +Returns a list of `RemoteFieldClass` objects.
@@ -6957,7 +9454,9 @@ Get a specific issue.
```typescript -await client.filestorage.issues.retrieve("id"); +await client.crm.notes.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -6973,7 +9472,7 @@ await client.filestorage.issues.retrieve("id");
-**id:** `string` +**request:** `Merge.crm.NotesRemoteFieldClassesListRequest`
@@ -6981,7 +9480,7 @@ await client.filestorage.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Notes.RequestOptions`
@@ -6992,9 +9491,9 @@ await client.filestorage.issues.retrieve("id");
-## Filestorage LinkToken +## Crm Opportunities -
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken +
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList
@@ -7006,7 +9505,7 @@ await client.filestorage.issues.retrieve("id");
-Creates a link token to be used when linking a new end user. +Returns a list of `Opportunity` objects.
@@ -7022,11 +9521,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.opportunities.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7043,7 +9539,7 @@ await client.filestorage.linkToken.create({
-**request:** `Merge.filestorage.EndUserDetailsRequest` +**request:** `Merge.crm.OpportunitiesListRequest`
@@ -7051,7 +9547,7 @@ await client.filestorage.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7062,9 +9558,7 @@ await client.filestorage.linkToken.create({
-## Filestorage LinkedAccounts - -
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse
@@ -7076,7 +9570,7 @@ await client.filestorage.linkToken.create({
-List linked accounts for your organization. +Creates an `Opportunity` object with the given values.
@@ -7092,8 +9586,8 @@ List linked accounts for your organization.
```typescript -await client.filestorage.linkedAccounts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.opportunities.create({ + model: {}, }); ``` @@ -7110,7 +9604,7 @@ await client.filestorage.linkedAccounts.list({
-**request:** `Merge.filestorage.LinkedAccountsListRequest` +**request:** `Merge.crm.OpportunityEndpointRequest`
@@ -7118,7 +9612,7 @@ await client.filestorage.linkedAccounts.list({
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7129,9 +9623,7 @@ await client.filestorage.linkedAccounts.list({
-## Filestorage Passthrough - -
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity
@@ -7143,7 +9635,7 @@ await client.filestorage.linkedAccounts.list({
-Pull data from an endpoint not currently supported by Merge. +Returns an `Opportunity` object with the given `id`.
@@ -7159,10 +9651,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.filestorage.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.opportunities.retrieve("id"); ```
@@ -7172,13 +9661,21 @@ await client.filestorage.passthrough.create({ #### ⚙️ Parameters -
-
+
+
+ +
+
+ +**id:** `string` + +
+
-**request:** `Merge.DataPassthroughRequest` +**request:** `Merge.crm.OpportunitiesRetrieveRequest`
@@ -7186,7 +9683,7 @@ await client.filestorage.passthrough.create({
-**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7197,9 +9694,7 @@ await client.filestorage.passthrough.create({
-## Filestorage RegenerateKey - -
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse
@@ -7211,7 +9706,7 @@ await client.filestorage.passthrough.create({
-Exchange remote keys. +Updates an `Opportunity` object with the given `id`.
@@ -7227,8 +9722,8 @@ Exchange remote keys.
```typescript -await client.filestorage.regenerateKey.create({ - name: "Remote Deployment Key 1", +await client.crm.opportunities.partialUpdate("id", { + model: {}, }); ``` @@ -7245,7 +9740,7 @@ await client.filestorage.regenerateKey.create({
-**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest` +**id:** `string`
@@ -7253,7 +9748,15 @@ await client.filestorage.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**request:** `Merge.crm.PatchedOpportunityEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Opportunities.RequestOptions`
@@ -7264,9 +9767,7 @@ await client.filestorage.regenerateKey.create({
-## Filestorage SyncStatus - -
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -7278,7 +9779,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 metadata for `Opportunity` PATCHs.
@@ -7294,9 +9795,7 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.filestorage.syncStatus.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.opportunities.metaPatchRetrieve("id"); ```
@@ -7312,7 +9811,7 @@ await client.filestorage.syncStatus.list({
-**request:** `Merge.filestorage.SyncStatusListRequest` +**id:** `string`
@@ -7320,7 +9819,7 @@ await client.filestorage.syncStatus.list({
-**requestOptions:** `SyncStatus.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7331,9 +9830,7 @@ await client.filestorage.syncStatus.list({
-## Filestorage ForceResync - -
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse
@@ -7345,7 +9842,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 metadata for `Opportunity` POSTs.
@@ -7361,7 +9858,7 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.filestorage.forceResync.syncStatusResyncCreate(); +await client.crm.opportunities.metaPostRetrieve(); ```
@@ -7377,7 +9874,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7388,9 +9885,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-## Filestorage Users - -
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList +
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -7402,7 +9897,7 @@ await client.filestorage.forceResync.syncStatusResyncCreate();
-Returns a list of `User` objects. +Returns a list of `RemoteFieldClass` objects.
@@ -7418,7 +9913,7 @@ Returns a list of `User` objects.
```typescript -await client.filestorage.users.list({ +await client.crm.opportunities.remoteFieldClassesList({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7436,7 +9931,7 @@ await client.filestorage.users.list({
-**request:** `Merge.filestorage.UsersListRequest` +**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest`
@@ -7444,7 +9939,7 @@ await client.filestorage.users.list({
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Opportunities.RequestOptions`
@@ -7455,7 +9950,9 @@ await client.filestorage.users.list({
-
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User +## Crm Passthrough + +
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -7467,7 +9964,7 @@ await client.filestorage.users.list({
-Returns a `User` object with the given `id`. +Pull data from an endpoint not currently supported by Merge.
@@ -7483,7 +9980,10 @@ Returns a `User` object with the given `id`.
```typescript -await client.filestorage.users.retrieve("id"); +await client.crm.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -7499,15 +9999,7 @@ await client.filestorage.users.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.filestorage.UsersRetrieveRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -7515,7 +10007,7 @@ await client.filestorage.users.retrieve("id");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -7526,9 +10018,9 @@ await client.filestorage.users.retrieve("id");
-## Filestorage WebhookReceivers +## Crm RegenerateKey -
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -7540,7 +10032,7 @@ await client.filestorage.users.retrieve("id");
-Returns a list of `WebhookReceiver` objects. +Exchange remote keys.
@@ -7556,7 +10048,9 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.filestorage.webhookReceivers.list(); +await client.crm.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -7572,7 +10066,15 @@ await client.filestorage.webhookReceivers.list();
-**requestOptions:** `WebhookReceivers.RequestOptions` +**request:** `Merge.crm.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -7583,7 +10085,9 @@ await client.filestorage.webhookReceivers.list();
-
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +## Crm Stages + +
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList
@@ -7595,7 +10099,7 @@ await client.filestorage.webhookReceivers.list();
-Creates a `WebhookReceiver` object with the given values. +Returns a list of `Stage` objects.
@@ -7611,9 +10115,8 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.filestorage.webhookReceivers.create({ - event: "event", - isActive: true, +await client.crm.stages.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7630,7 +10133,7 @@ await client.filestorage.webhookReceivers.create({
-**request:** `Merge.filestorage.WebhookReceiverRequest` +**request:** `Merge.crm.StagesListRequest`
@@ -7638,7 +10141,7 @@ await client.filestorage.webhookReceivers.create({
-**requestOptions:** `WebhookReceivers.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -7649,9 +10152,7 @@ await client.filestorage.webhookReceivers.create({
-## Crm AccountDetails - -
client.crm.accountDetails.retrieve() -> Merge.AccountDetails +
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage
@@ -7663,7 +10164,7 @@ await client.filestorage.webhookReceivers.create({
-Get details for a linked account. +Returns a `Stage` object with the given `id`.
@@ -7679,7 +10180,7 @@ Get details for a linked account.
```typescript -await client.crm.accountDetails.retrieve(); +await client.crm.stages.retrieve("id"); ```
@@ -7695,7 +10196,23 @@ await client.crm.accountDetails.retrieve();
-**requestOptions:** `AccountDetails.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.StagesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Stages.RequestOptions`
@@ -7706,9 +10223,7 @@ await client.crm.accountDetails.retrieve();
-## Crm AccountToken - -
client.crm.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -7720,7 +10235,7 @@ await client.crm.accountDetails.retrieve();
-Returns the account token for the end user with the provided public token. +Returns a list of `RemoteFieldClass` objects.
@@ -7736,7 +10251,9 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.crm.accountToken.retrieve("public_token"); +await client.crm.stages.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -7752,7 +10269,7 @@ await client.crm.accountToken.retrieve("public_token");
-**publicToken:** `string` +**request:** `Merge.crm.StagesRemoteFieldClassesListRequest`
@@ -7760,7 +10277,7 @@ await client.crm.accountToken.retrieve("public_token");
-**requestOptions:** `AccountToken.RequestOptions` +**requestOptions:** `Stages.RequestOptions`
@@ -7771,9 +10288,9 @@ await client.crm.accountToken.retrieve("public_token");
-## Crm Accounts +## Crm SyncStatus -
client.crm.accounts.list({ ...params }) -> Merge.PaginatedAccountList +
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -7785,7 +10302,7 @@ await client.crm.accountToken.retrieve("public_token");
-Returns a list of `Account` objects. +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).
@@ -7801,7 +10318,7 @@ Returns a list of `Account` objects.
```typescript -await client.crm.accounts.list({ +await client.crm.syncStatus.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -7819,7 +10336,7 @@ await client.crm.accounts.list({
-**request:** `Merge.crm.AccountsListRequest` +**request:** `Merge.crm.SyncStatusListRequest`
@@ -7827,7 +10344,7 @@ await client.crm.accounts.list({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -7838,7 +10355,9 @@ await client.crm.accounts.list({
-
client.crm.accounts.create({ ...params }) -> Merge.CrmAccountResponse +## Crm ForceResync + +
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -7850,7 +10369,7 @@ await client.crm.accounts.list({
-Creates an `Account` object with the given values. +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.
@@ -7866,9 +10385,7 @@ Creates an `Account` object with the given values.
```typescript -await client.crm.accounts.create({ - model: {}, -}); +await client.crm.forceResync.syncStatusResyncCreate(); ```
@@ -7884,15 +10401,7 @@ await client.crm.accounts.create({
-**request:** `Merge.crm.CrmAccountEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -7903,7 +10412,9 @@ await client.crm.accounts.create({
-
client.crm.accounts.retrieve(id, { ...params }) -> Merge.Account +## Crm Tasks + +
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList
@@ -7915,7 +10426,7 @@ await client.crm.accounts.create({
-Returns an `Account` object with the given `id`. +Returns a list of `Task` objects.
@@ -7931,7 +10442,9 @@ Returns an `Account` object with the given `id`.
```typescript -await client.crm.accounts.retrieve("id"); +await client.crm.tasks.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -7947,15 +10460,7 @@ await client.crm.accounts.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.AccountsRetrieveRequest` +**request:** `Merge.crm.TasksListRequest`
@@ -7963,7 +10468,7 @@ await client.crm.accounts.retrieve("id");
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -7974,7 +10479,7 @@ await client.crm.accounts.retrieve("id");
-
client.crm.accounts.partialUpdate(id, { ...params }) -> Merge.CrmAccountResponse +
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse
@@ -7986,7 +10491,7 @@ await client.crm.accounts.retrieve("id");
-Updates an `Account` object with the given `id`. +Creates a `Task` object with the given values.
@@ -8002,7 +10507,7 @@ Updates an `Account` object with the given `id`.
```typescript -await client.crm.accounts.partialUpdate("id", { +await client.crm.tasks.create({ model: {}, }); ``` @@ -8020,15 +10525,7 @@ await client.crm.accounts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmAccountEndpointRequest` +**request:** `Merge.crm.TaskEndpointRequest`
@@ -8036,7 +10533,7 @@ await client.crm.accounts.partialUpdate("id", {
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -8047,7 +10544,7 @@ await client.crm.accounts.partialUpdate("id", {
-
client.crm.accounts.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task
@@ -8059,7 +10556,7 @@ await client.crm.accounts.partialUpdate("id", {
-Returns metadata for `CRMAccount` PATCHs. +Returns a `Task` object with the given `id`.
@@ -8075,7 +10572,7 @@ Returns metadata for `CRMAccount` PATCHs.
```typescript -await client.crm.accounts.metaPatchRetrieve("id"); +await client.crm.tasks.retrieve("id"); ```
@@ -8099,7 +10596,15 @@ await client.crm.accounts.metaPatchRetrieve("id");
-**requestOptions:** `Accounts.RequestOptions` +**request:** `Merge.crm.TasksRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -8110,7 +10615,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-
client.crm.accounts.metaPostRetrieve() -> Merge.MetaResponse +
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse
@@ -8122,7 +10627,7 @@ await client.crm.accounts.metaPatchRetrieve("id");
-Returns metadata for `CRMAccount` POSTs. +Updates a `Task` object with the given `id`.
@@ -8138,7 +10643,9 @@ Returns metadata for `CRMAccount` POSTs.
```typescript -await client.crm.accounts.metaPostRetrieve(); +await client.crm.tasks.partialUpdate("id", { + model: {}, +}); ```
@@ -8154,7 +10661,23 @@ await client.crm.accounts.metaPostRetrieve();
-**requestOptions:** `Accounts.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.PatchedTaskEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Tasks.RequestOptions`
@@ -8165,7 +10688,7 @@ await client.crm.accounts.metaPostRetrieve();
-
client.crm.accounts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse
@@ -8177,7 +10700,7 @@ await client.crm.accounts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns metadata for `Task` PATCHs.
@@ -8193,9 +10716,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.accounts.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.crm.tasks.metaPatchRetrieve("id"); ```
@@ -8211,7 +10732,7 @@ await client.crm.accounts.remoteFieldClassesList({
-**request:** `Merge.crm.AccountsRemoteFieldClassesListRequest` +**id:** `string`
@@ -8219,7 +10740,7 @@ await client.crm.accounts.remoteFieldClassesList({
-**requestOptions:** `Accounts.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -8230,9 +10751,7 @@ await client.crm.accounts.remoteFieldClassesList({
-## Crm AsyncPassthrough - -
client.crm.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse
@@ -8244,7 +10763,7 @@ await client.crm.accounts.remoteFieldClassesList({
-Asynchronously pull data from an endpoint not currently supported by Merge. +Returns metadata for `Task` POSTs.
@@ -8260,10 +10779,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.crm.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.crm.tasks.metaPostRetrieve(); ```
@@ -8279,15 +10795,7 @@ await client.crm.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -8298,7 +10806,7 @@ await client.crm.asyncPassthrough.create({
-
client.crm.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -8310,7 +10818,7 @@ await client.crm.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Returns a list of `RemoteFieldClass` objects.
@@ -8326,7 +10834,9 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.crm.tasks.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -8342,7 +10852,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.crm.TasksRemoteFieldClassesListRequest`
@@ -8350,7 +10860,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Tasks.RequestOptions`
@@ -8361,9 +10871,9 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-## Crm AuditTrail +## Crm Users -
client.crm.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -8375,7 +10885,7 @@ await client.crm.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-Gets a list of audit trail events. +Returns a list of `User` objects.
@@ -8391,7 +10901,7 @@ Gets a list of audit trail events.
```typescript -await client.crm.auditTrail.list({ +await client.crm.users.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -8409,7 +10919,7 @@ await client.crm.auditTrail.list({
-**request:** `Merge.crm.AuditTrailListRequest` +**request:** `Merge.crm.UsersListRequest`
@@ -8417,7 +10927,7 @@ await client.crm.auditTrail.list({
-**requestOptions:** `AuditTrail.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -8428,9 +10938,7 @@ await client.crm.auditTrail.list({
-## Crm AvailableActions - -
client.crm.availableActions.retrieve() -> Merge.AvailableActions +
client.crm.users.retrieve(id, { ...params }) -> Merge.User
@@ -8442,7 +10950,7 @@ await client.crm.auditTrail.list({
-Returns a list of models and actions available for an account. +Returns a `User` object with the given `id`.
@@ -8458,7 +10966,7 @@ Returns a list of models and actions available for an account.
```typescript -await client.crm.availableActions.retrieve(); +await client.crm.users.retrieve("id"); ```
@@ -8474,7 +10982,23 @@ await client.crm.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.crm.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -8485,9 +11009,7 @@ await client.crm.availableActions.retrieve();
-## Crm Contacts - -
client.crm.contacts.list({ ...params }) -> Merge.PaginatedContactList +
client.crm.users.ignoreCreate(modelId, { ...params }) -> void
@@ -8499,7 +11021,7 @@ await client.crm.availableActions.retrieve();
-Returns a list of `Contact` 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.
@@ -8515,8 +11037,8 @@ Returns a list of `Contact` objects.
```typescript -await client.crm.contacts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.crm.users.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", }); ``` @@ -8533,7 +11055,7 @@ await client.crm.contacts.list({
-**request:** `Merge.crm.ContactsListRequest` +**modelId:** `string`
@@ -8541,7 +11063,15 @@ await client.crm.contacts.list({
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -8552,7 +11082,7 @@ await client.crm.contacts.list({
-
client.crm.contacts.create({ ...params }) -> Merge.CrmContactResponse +
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList
@@ -8564,7 +11094,7 @@ await client.crm.contacts.list({
-Creates a `Contact` object with the given values. +Returns a list of `RemoteFieldClass` objects.
@@ -8580,8 +11110,8 @@ Creates a `Contact` object with the given values.
```typescript -await client.crm.contacts.create({ - model: {}, +await client.crm.users.remoteFieldClassesList({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -8598,7 +11128,7 @@ await client.crm.contacts.create({
-**request:** `Merge.crm.CrmContactEndpointRequest` +**request:** `Merge.crm.UsersRemoteFieldClassesListRequest`
@@ -8606,7 +11136,7 @@ await client.crm.contacts.create({
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -8617,7 +11147,9 @@ await client.crm.contacts.create({
-
client.crm.contacts.retrieve(id, { ...params }) -> Merge.Contact +## Crm WebhookReceivers + +
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -8629,7 +11161,7 @@ await client.crm.contacts.create({
-Returns a `Contact` object with the given `id`. +Returns a list of `WebhookReceiver` objects.
@@ -8645,7 +11177,7 @@ Returns a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.retrieve("id"); +await client.crm.webhookReceivers.list(); ```
@@ -8661,23 +11193,7 @@ await client.crm.contacts.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.ContactsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -8688,7 +11204,7 @@ await client.crm.contacts.retrieve("id");
-
client.crm.contacts.partialUpdate(id, { ...params }) -> Merge.CrmContactResponse +
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -8700,7 +11216,7 @@ await client.crm.contacts.retrieve("id");
-Updates a `Contact` object with the given `id`. +Creates a `WebhookReceiver` object with the given values.
@@ -8716,8 +11232,9 @@ Updates a `Contact` object with the given `id`.
```typescript -await client.crm.contacts.partialUpdate("id", { - model: {}, +await client.crm.webhookReceivers.create({ + event: "event", + isActive: true, }); ``` @@ -8734,15 +11251,7 @@ await client.crm.contacts.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedCrmContactEndpointRequest` +**request:** `Merge.crm.WebhookReceiverRequest`
@@ -8750,7 +11259,7 @@ await client.crm.contacts.partialUpdate("id", {
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -8761,7 +11270,9 @@ await client.crm.contacts.partialUpdate("id", {
-
client.crm.contacts.ignoreCreate(modelId, { ...params }) -> void +## Filestorage AccountDetails + +
client.filestorage.accountDetails.retrieve() -> Merge.AccountDetails
@@ -8773,7 +11284,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 details for a linked account.
@@ -8789,9 +11300,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.accountDetails.retrieve(); ```
@@ -8807,23 +11316,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.IgnoreCommonModelRequest` - -
-
- -
-
- -**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -8834,7 +11327,9 @@ await client.crm.contacts.ignoreCreate("model_id", {
-
client.crm.contacts.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage AccountToken + +
client.filestorage.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -8846,7 +11341,7 @@ await client.crm.contacts.ignoreCreate("model_id", {
-Returns metadata for `CRMContact` PATCHs. +Returns the account token for the end user with the provided public token.
@@ -8862,7 +11357,7 @@ Returns metadata for `CRMContact` PATCHs.
```typescript -await client.crm.contacts.metaPatchRetrieve("id"); +await client.filestorage.accountToken.retrieve("public_token"); ```
@@ -8878,7 +11373,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**id:** `string` +**publicToken:** `string`
@@ -8886,7 +11381,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `AccountToken.RequestOptions`
@@ -8897,7 +11392,9 @@ await client.crm.contacts.metaPatchRetrieve("id");
-
client.crm.contacts.metaPostRetrieve() -> Merge.MetaResponse +## Filestorage AsyncPassthrough + +
client.filestorage.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -8909,7 +11406,7 @@ await client.crm.contacts.metaPatchRetrieve("id");
-Returns metadata for `CRMContact` POSTs. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -8925,7 +11422,10 @@ Returns metadata for `CRMContact` POSTs.
```typescript -await client.crm.contacts.metaPostRetrieve(); +await client.filestorage.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -8941,7 +11441,15 @@ await client.crm.contacts.metaPostRetrieve();
-**requestOptions:** `Contacts.RequestOptions` +**request:** `Merge.DataPassthroughRequest` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -8952,7 +11460,7 @@ await client.crm.contacts.metaPostRetrieve();
-
client.crm.contacts.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -8964,7 +11472,7 @@ await client.crm.contacts.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Retrieves data from earlier async-passthrough POST request
@@ -8978,11 +11486,9 @@ Returns a list of `RemoteFieldClass` objects.
- -```typescript -await client.crm.contacts.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); + +```typescript +await client.filestorage.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -8998,7 +11504,7 @@ await client.crm.contacts.remoteFieldClassesList({
-**request:** `Merge.crm.ContactsRemoteFieldClassesListRequest` +**asyncPassthroughReceiptId:** `string`
@@ -9006,7 +11512,7 @@ await client.crm.contacts.remoteFieldClassesList({
-**requestOptions:** `Contacts.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -9017,9 +11523,9 @@ await client.crm.contacts.remoteFieldClassesList({
-## Crm CustomObjectClasses +## Filestorage AuditTrail -
client.crm.customObjectClasses.list({ ...params }) -> Merge.PaginatedCustomObjectClassList +
client.filestorage.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -9031,7 +11537,7 @@ await client.crm.contacts.remoteFieldClassesList({
-Returns a list of `CustomObjectClass` objects. +Gets a list of audit trail events.
@@ -9047,7 +11553,7 @@ Returns a list of `CustomObjectClass` objects.
```typescript -await client.crm.customObjectClasses.list({ +await client.filestorage.auditTrail.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9065,7 +11571,7 @@ await client.crm.customObjectClasses.list({
-**request:** `Merge.crm.CustomObjectClassesListRequest` +**request:** `Merge.filestorage.AuditTrailListRequest`
@@ -9073,7 +11579,7 @@ await client.crm.customObjectClasses.list({
-**requestOptions:** `CustomObjectClasses.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -9084,7 +11590,9 @@ await client.crm.customObjectClasses.list({
-
client.crm.customObjectClasses.retrieve(id, { ...params }) -> Merge.CustomObjectClass +## Filestorage AvailableActions + +
client.filestorage.availableActions.retrieve() -> Merge.AvailableActions
@@ -9096,7 +11604,7 @@ await client.crm.customObjectClasses.list({
-Returns a `CustomObjectClass` object with the given `id`. +Returns a list of models and actions available for an account.
@@ -9112,7 +11620,7 @@ Returns a `CustomObjectClass` object with the given `id`.
```typescript -await client.crm.customObjectClasses.retrieve("id"); +await client.filestorage.availableActions.retrieve(); ```
@@ -9128,23 +11636,7 @@ await client.crm.customObjectClasses.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `CustomObjectClasses.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -9155,9 +11647,9 @@ await client.crm.customObjectClasses.retrieve("id");
-## Crm AssociationTypes +## Filestorage Scopes -
client.crm.associationTypes.customObjectClassesAssociationTypesList(customObjectClassId, { ...params }) -> Merge.PaginatedAssociationTypeList +
client.filestorage.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -9169,7 +11661,7 @@ await client.crm.customObjectClasses.retrieve("id");
-Returns a list of `AssociationType` objects. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -9185,9 +11677,7 @@ Returns a list of `AssociationType` objects.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesList("custom_object_class_id", { - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.scopes.defaultScopesRetrieve(); ```
@@ -9203,23 +11693,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesListRequest` - -
-
- -
-
- -**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -9230,7 +11704,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-
client.crm.associationTypes.customObjectClassesAssociationTypesCreate(customObjectClassId, { ...params }) -> Merge.CrmAssociationTypeResponse +
client.filestorage.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -9242,7 +11716,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesList("custo
-Creates an `AssociationType` object with the given values. +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).
@@ -9258,21 +11732,7 @@ 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.scopes.linkedAccountScopesRetrieve(); ```
@@ -9288,23 +11748,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CrmAssociationTypeEndpointRequest` - -
-
- -
-
- -**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -9315,7 +11759,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-
client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve(customObjectClassId, id, { ...params }) -> Merge.AssociationType +
client.filestorage.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -9327,7 +11771,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesCreate("cus
-Returns an `AssociationType` 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)
@@ -9343,7 +11787,33 @@ Returns an `AssociationType` object with the given `id`.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("custom_object_class_id", "id"); +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, + }, + }, + }, + ], +}); ```
@@ -9359,23 +11829,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesAssociationTypesRetrieveRequest` +**request:** `Merge.filestorage.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -9383,7 +11837,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -9394,7 +11848,9 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-
client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +## Filestorage DeleteAccount + +
client.filestorage.deleteAccount.delete() -> void
@@ -9406,7 +11862,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesRetrieve("c
-Returns metadata for `CRMAssociationType` POSTs. +Delete a linked account.
@@ -9422,7 +11878,7 @@ Returns metadata for `CRMAssociationType` POSTs.
```typescript -await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRetrieve("custom_object_class_id"); +await client.filestorage.deleteAccount.delete(); ```
@@ -9438,15 +11894,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-**customObjectClassId:** `string` - -
-
- -
-
- -**requestOptions:** `AssociationTypes.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -9457,9 +11905,9 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-## Crm CustomObjects +## Filestorage Drives -
client.crm.customObjects.customObjectClassesCustomObjectsList(customObjectClassId, { ...params }) -> Merge.PaginatedCustomObjectList +
client.filestorage.drives.list({ ...params }) -> Merge.PaginatedDriveList
@@ -9471,7 +11919,7 @@ await client.crm.associationTypes.customObjectClassesAssociationTypesMetaPostRet
-Returns a list of `CustomObject` objects. +Returns a list of `Drive` objects.
@@ -9487,7 +11935,7 @@ Returns a list of `CustomObject` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_object_class_id", { +await client.filestorage.drives.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -9505,15 +11953,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**customObjectClassId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsListRequest` +**request:** `Merge.filestorage.DrivesListRequest`
@@ -9521,7 +11961,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Drives.RequestOptions`
@@ -9532,7 +11972,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-
client.crm.customObjects.customObjectClassesCustomObjectsCreate(customObjectClassId, { ...params }) -> Merge.CrmCustomObjectResponse +
client.filestorage.drives.retrieve(id, { ...params }) -> Merge.Drive
@@ -9544,7 +11984,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsList("custom_obje
-Creates a `CustomObject` object with the given values. +Returns a `Drive` object with the given `id`.
@@ -9560,13 +12000,7 @@ 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.drives.retrieve("id"); ```
@@ -9582,7 +12016,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**customObjectClassId:** `string` +**id:** `string`
@@ -9590,7 +12024,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**request:** `Merge.crm.CrmCustomObjectEndpointRequest` +**request:** `Merge.filestorage.DrivesRetrieveRequest`
@@ -9598,7 +12032,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `Drives.RequestOptions`
@@ -9609,7 +12043,9 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-
client.crm.customObjects.customObjectClassesCustomObjectsRetrieve(customObjectClassId, id, { ...params }) -> Merge.CustomObject +## Filestorage FieldMapping + +
client.filestorage.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -9621,7 +12057,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsCreate("custom_ob
-Returns a `CustomObject` 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/).
@@ -9637,7 +12073,7 @@ Returns a `CustomObject` object with the given `id`.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_object_class_id", "id"); +await client.filestorage.fieldMapping.fieldMappingsRetrieve(); ```
@@ -9653,23 +12089,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**customObjectClassId:** `string` - -
-
- -
-
- -**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.CustomObjectClassesCustomObjectsRetrieveRequest` +**request:** `Merge.filestorage.FieldMappingsRetrieveRequest`
@@ -9677,7 +12097,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -9688,7 +12108,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-
client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(customObjectClassId) -> Merge.MetaResponse +
client.filestorage.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -9700,7 +12120,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRetrieve("custom_
-Returns metadata for `CRMCustomObject` POSTs. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -9716,7 +12136,14 @@ Returns metadata for `CRMCustomObject` POSTs.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve("custom_object_class_id"); +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", +}); ```
@@ -9732,7 +12159,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**customObjectClassId:** `string` +**request:** `Merge.filestorage.CreateFieldMappingRequest`
@@ -9740,7 +12167,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -9751,7 +12178,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-
client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.filestorage.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -9763,7 +12190,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsMetaPostRetrieve(
-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.
@@ -9779,9 +12206,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -9797,7 +12222,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest` +**fieldMappingId:** `string`
@@ -9805,7 +12230,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-**requestOptions:** `CustomObjects.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -9816,9 +12241,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-## Crm Associations - -
client.crm.associations.customObjectClassesCustomObjectsAssociationsList(customObjectClassId, objectId, { ...params }) -> Merge.PaginatedAssociationList +
client.filestorage.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -9830,7 +12253,7 @@ await client.crm.customObjects.customObjectClassesCustomObjectsRemoteFieldClasse
-Returns a list of `Association` 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.
@@ -9846,9 +12269,7 @@ Returns a list of `Association` objects.
```typescript -await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("custom_object_class_id", "object_id", { - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -9864,15 +12285,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**customObjectClassId:** `string` - -
-
- -
-
- -**objectId:** `string` +**fieldMappingId:** `string`
@@ -9880,7 +12293,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsListRequest` +**request:** `Merge.filestorage.PatchedEditFieldMappingRequest`
@@ -9888,7 +12301,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-**requestOptions:** `Associations.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -9899,7 +12312,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-
client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate(associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, { ...params }) -> Merge.Association +
client.filestorage.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -9911,7 +12324,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsList("
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_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/).
@@ -9927,13 +12340,7 @@ 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.fieldMapping.remoteFieldsRetrieve(); ```
@@ -9949,7 +12356,7 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**associationTypeId:** `string` +**request:** `Merge.filestorage.RemoteFieldsRetrieveRequest`
@@ -9957,47 +12364,62 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-**sourceClassId:** `string` +**requestOptions:** `FieldMapping.RequestOptions`
- -
-
- -**sourceObjectId:** `string` +
+
+
+
client.filestorage.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
-**targetClassId:** `string` +#### 📝 Description -
-
+
+
-**targetObjectId:** `string` +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/).
+
+
+ +#### 🔌 Usage
-**request:** `Merge.crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest` +
+
+ +```typescript +await client.filestorage.fieldMapping.targetFieldsRetrieve(); +```
+
+
+ +#### ⚙️ Parameters
-**requestOptions:** `Associations.RequestOptions` +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -10008,9 +12430,9 @@ await client.crm.associations.customObjectClassesCustomObjectsAssociationsUpdate
-## Crm Scopes +## Filestorage Files -
client.crm.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.filestorage.files.list({ ...params }) -> Merge.PaginatedFileList
@@ -10022,7 +12444,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). +Returns a list of `File` objects.
@@ -10038,7 +12460,9 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.crm.scopes.defaultScopesRetrieve(); +await client.filestorage.files.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10054,7 +12478,15 @@ await client.crm.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.FilesListRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -10065,7 +12497,7 @@ await client.crm.scopes.defaultScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +
client.filestorage.files.create({ ...params }) -> Merge.FileStorageFileResponse
@@ -10077,7 +12509,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). +Creates a `File` object with the given values.
@@ -10093,7 +12525,9 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.crm.scopes.linkedAccountScopesRetrieve(); +await client.filestorage.files.create({ + model: {}, +}); ```
@@ -10109,7 +12543,15 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.FileStorageFileEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -10120,7 +12562,7 @@ await client.crm.scopes.linkedAccountScopesRetrieve();
-
client.crm.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +
client.filestorage.files.retrieve(id, { ...params }) -> Merge.File_
@@ -10132,7 +12574,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) +Returns a `File` object with the given `id`.
@@ -10148,33 +12590,7 @@ 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.files.retrieve("id"); ```
@@ -10190,7 +12606,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**request:** `Merge.crm.LinkedAccountCommonModelScopeDeserializerRequest` +**id:** `string`
@@ -10198,7 +12614,15 @@ await client.crm.scopes.linkedAccountScopesCreate({
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.filestorage.FilesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -10209,9 +12633,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-## Crm DeleteAccount - -
client.crm.deleteAccount.delete() -> void +
client.filestorage.files.downloadRequestMetaRetrieve(id, { ...params }) -> Merge.DownloadRequestMeta
@@ -10223,7 +12645,7 @@ await client.crm.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party.
@@ -10239,7 +12661,7 @@ Delete a linked account.
```typescript -await client.crm.deleteAccount.delete(); +await client.filestorage.files.downloadRequestMetaRetrieve("id"); ```
@@ -10255,7 +12677,23 @@ await client.crm.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.FilesDownloadRequestMetaRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Files.RequestOptions`
@@ -10266,9 +12704,7 @@ await client.crm.deleteAccount.delete();
-## Crm EngagementTypes - -
client.crm.engagementTypes.list({ ...params }) -> Merge.PaginatedEngagementTypeList +
client.filestorage.files.downloadRequestMetaList({ ...params }) -> Merge.PaginatedDownloadRequestMetaList
@@ -10280,7 +12716,7 @@ await client.crm.deleteAccount.delete();
-Returns a list of `EngagementType` objects. +Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party.
@@ -10296,7 +12732,7 @@ Returns a list of `EngagementType` objects.
```typescript -await client.crm.engagementTypes.list({ +await client.filestorage.files.downloadRequestMetaList({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10314,7 +12750,7 @@ await client.crm.engagementTypes.list({
-**request:** `Merge.crm.EngagementTypesListRequest` +**request:** `Merge.filestorage.FilesDownloadRequestMetaListRequest`
@@ -10322,7 +12758,7 @@ await client.crm.engagementTypes.list({
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -10333,7 +12769,7 @@ await client.crm.engagementTypes.list({
-
client.crm.engagementTypes.retrieve(id, { ...params }) -> Merge.EngagementType +
client.filestorage.files.metaPostRetrieve() -> Merge.MetaResponse
@@ -10345,7 +12781,7 @@ await client.crm.engagementTypes.list({
-Returns an `EngagementType` object with the given `id`. +Returns metadata for `FileStorageFile` POSTs.
@@ -10361,7 +12797,7 @@ Returns an `EngagementType` object with the given `id`.
```typescript -await client.crm.engagementTypes.retrieve("id"); +await client.filestorage.files.metaPostRetrieve(); ```
@@ -10377,23 +12813,7 @@ await client.crm.engagementTypes.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.EngagementTypesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Files.RequestOptions`
@@ -10404,7 +12824,9 @@ await client.crm.engagementTypes.retrieve("id");
-
client.crm.engagementTypes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Filestorage Folders + +
client.filestorage.folders.list({ ...params }) -> Merge.PaginatedFolderList
@@ -10416,7 +12838,7 @@ await client.crm.engagementTypes.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `Folder` objects.
@@ -10432,7 +12854,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagementTypes.remoteFieldClassesList({ +await client.filestorage.folders.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10450,7 +12872,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-**request:** `Merge.crm.EngagementTypesRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.FoldersListRequest`
@@ -10458,7 +12880,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-**requestOptions:** `EngagementTypes.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -10469,9 +12891,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-## Crm Engagements - -
client.crm.engagements.list({ ...params }) -> Merge.PaginatedEngagementList +
client.filestorage.folders.create({ ...params }) -> Merge.FileStorageFolderResponse
@@ -10483,7 +12903,7 @@ await client.crm.engagementTypes.remoteFieldClassesList({
-Returns a list of `Engagement` objects. +Creates a `Folder` object with the given values.
@@ -10499,8 +12919,8 @@ Returns a list of `Engagement` objects.
```typescript -await client.crm.engagements.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.filestorage.folders.create({ + model: {}, }); ``` @@ -10517,7 +12937,7 @@ await client.crm.engagements.list({
-**request:** `Merge.crm.EngagementsListRequest` +**request:** `Merge.filestorage.FileStorageFolderEndpointRequest`
@@ -10525,7 +12945,7 @@ await client.crm.engagements.list({
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -10536,7 +12956,7 @@ await client.crm.engagements.list({
-
client.crm.engagements.create({ ...params }) -> Merge.EngagementResponse +
client.filestorage.folders.retrieve(id, { ...params }) -> Merge.Folder
@@ -10548,7 +12968,7 @@ await client.crm.engagements.list({
-Creates an `Engagement` object with the given values. +Returns a `Folder` object with the given `id`.
@@ -10564,9 +12984,7 @@ Creates an `Engagement` object with the given values.
```typescript -await client.crm.engagements.create({ - model: {}, -}); +await client.filestorage.folders.retrieve("id"); ```
@@ -10582,7 +13000,7 @@ await client.crm.engagements.create({
-**request:** `Merge.crm.EngagementEndpointRequest` +**id:** `string`
@@ -10590,7 +13008,15 @@ await client.crm.engagements.create({
-**requestOptions:** `Engagements.RequestOptions` +**request:** `Merge.filestorage.FoldersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Folders.RequestOptions`
@@ -10601,7 +13027,7 @@ await client.crm.engagements.create({
-
client.crm.engagements.retrieve(id, { ...params }) -> Merge.Engagement +
client.filestorage.folders.metaPostRetrieve() -> Merge.MetaResponse
@@ -10613,7 +13039,7 @@ await client.crm.engagements.create({
-Returns an `Engagement` object with the given `id`. +Returns metadata for `FileStorageFolder` POSTs.
@@ -10629,7 +13055,7 @@ Returns an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.retrieve("id"); +await client.filestorage.folders.metaPostRetrieve(); ```
@@ -10645,23 +13071,7 @@ await client.crm.engagements.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.EngagementsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Folders.RequestOptions`
@@ -10672,7 +13082,9 @@ await client.crm.engagements.retrieve("id");
-
client.crm.engagements.partialUpdate(id, { ...params }) -> Merge.EngagementResponse +## Filestorage GenerateKey + +
client.filestorage.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -10684,7 +13096,7 @@ await client.crm.engagements.retrieve("id");
-Updates an `Engagement` object with the given `id`. +Create a remote key.
@@ -10700,8 +13112,8 @@ Updates an `Engagement` object with the given `id`.
```typescript -await client.crm.engagements.partialUpdate("id", { - model: {}, +await client.filestorage.generateKey.create({ + name: "Remote Deployment Key 1", }); ``` @@ -10718,15 +13130,7 @@ await client.crm.engagements.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEngagementEndpointRequest` +**request:** `Merge.filestorage.GenerateRemoteKeyRequest`
@@ -10734,7 +13138,7 @@ await client.crm.engagements.partialUpdate("id", {
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `GenerateKey.RequestOptions`
@@ -10745,7 +13149,9 @@ await client.crm.engagements.partialUpdate("id", {
-
client.crm.engagements.metaPatchRetrieve(id) -> Merge.MetaResponse +## Filestorage Groups + +
client.filestorage.groups.list({ ...params }) -> Merge.PaginatedGroupList
@@ -10757,7 +13163,7 @@ await client.crm.engagements.partialUpdate("id", {
-Returns metadata for `Engagement` PATCHs. +Returns a list of `Group` objects.
@@ -10773,7 +13179,9 @@ Returns metadata for `Engagement` PATCHs.
```typescript -await client.crm.engagements.metaPatchRetrieve("id"); +await client.filestorage.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -10789,7 +13197,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.filestorage.GroupsListRequest`
@@ -10797,7 +13205,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -10808,7 +13216,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-
client.crm.engagements.metaPostRetrieve() -> Merge.MetaResponse +
client.filestorage.groups.retrieve(id, { ...params }) -> Merge.Group
@@ -10820,7 +13228,7 @@ await client.crm.engagements.metaPatchRetrieve("id");
-Returns metadata for `Engagement` POSTs. +Returns a `Group` object with the given `id`.
@@ -10836,7 +13244,7 @@ Returns metadata for `Engagement` POSTs.
```typescript -await client.crm.engagements.metaPostRetrieve(); +await client.filestorage.groups.retrieve("id"); ```
@@ -10852,7 +13260,23 @@ await client.crm.engagements.metaPostRetrieve();
-**requestOptions:** `Engagements.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.filestorage.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions`
@@ -10863,7 +13287,9 @@ await client.crm.engagements.metaPostRetrieve();
-
client.crm.engagements.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Filestorage Issues + +
client.filestorage.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -10875,7 +13301,7 @@ await client.crm.engagements.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Gets all issues for Organization.
@@ -10891,7 +13317,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.engagements.remoteFieldClassesList({ +await client.filestorage.issues.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -10909,7 +13335,7 @@ await client.crm.engagements.remoteFieldClassesList({
-**request:** `Merge.crm.EngagementsRemoteFieldClassesListRequest` +**request:** `Merge.filestorage.IssuesListRequest`
@@ -10917,7 +13343,7 @@ await client.crm.engagements.remoteFieldClassesList({
-**requestOptions:** `Engagements.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -10928,9 +13354,7 @@ await client.crm.engagements.remoteFieldClassesList({
-## Crm FieldMapping - -
client.crm.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.filestorage.issues.retrieve(id) -> Merge.Issue
@@ -10942,7 +13366,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/). +Get a specific issue.
@@ -10958,7 +13382,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.crm.fieldMapping.fieldMappingsRetrieve(); +await client.filestorage.issues.retrieve("id"); ```
@@ -10974,7 +13398,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.crm.FieldMappingsRetrieveRequest` +**id:** `string`
@@ -10982,7 +13406,7 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -10993,7 +13417,9 @@ await client.crm.fieldMapping.fieldMappingsRetrieve();
-
client.crm.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +## Filestorage LinkToken + +
client.filestorage.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -11005,7 +13431,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. +Creates a link token to be used when linking a new end user.
@@ -11021,13 +13447,11 @@ 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.filestorage.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], }); ``` @@ -11044,7 +13468,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.crm.CreateFieldMappingRequest` +**request:** `Merge.filestorage.EndUserDetailsRequest`
@@ -11052,7 +13476,7 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `LinkToken.RequestOptions`
@@ -11063,7 +13487,9 @@ await client.crm.fieldMapping.fieldMappingsCreate({
-
client.crm.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +## Filestorage LinkedAccounts + +
client.filestorage.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -11075,7 +13501,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. +List linked accounts for your organization.
@@ -11091,7 +13517,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.filestorage.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -11107,7 +13535,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.filestorage.LinkedAccountsListRequest`
@@ -11115,7 +13543,7 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -11126,7 +13554,9 @@ await client.crm.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.crm.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +## Filestorage Passthrough + +
client.filestorage.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -11138,7 +13568,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. +Pull data from an endpoint not currently supported by Merge.
@@ -11154,7 +13584,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.filestorage.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -11170,15 +13603,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**fieldMappingId:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedEditFieldMappingRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -11186,7 +13611,7 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -11197,7 +13622,9 @@ await client.crm.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-
client.crm.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +## Filestorage RegenerateKey + +
client.filestorage.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -11209,7 +13636,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/). +Exchange remote keys.
@@ -11225,7 +13652,9 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.crm.fieldMapping.remoteFieldsRetrieve(); +await client.filestorage.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -11241,7 +13670,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.crm.RemoteFieldsRetrieveRequest` +**request:** `Merge.filestorage.RemoteKeyForRegenerationRequest`
@@ -11249,7 +13678,7 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -11260,7 +13689,9 @@ await client.crm.fieldMapping.remoteFieldsRetrieve();
-
client.crm.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +## Filestorage SyncStatus + +
client.filestorage.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -11272,7 +13703,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/). +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).
@@ -11288,7 +13719,9 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.crm.fieldMapping.targetFieldsRetrieve(); +await client.filestorage.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -11304,7 +13737,15 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**request:** `Merge.filestorage.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions`
@@ -11315,9 +13756,9 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-## Crm GenerateKey +## Filestorage ForceResync -
client.crm.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.filestorage.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -11329,7 +13770,7 @@ await client.crm.fieldMapping.targetFieldsRetrieve();
-Create a remote key. +Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.
@@ -11345,9 +13786,7 @@ Create a remote key.
```typescript -await client.crm.generateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.filestorage.forceResync.syncStatusResyncCreate(); ```
@@ -11363,15 +13802,7 @@ await client.crm.generateKey.create({
-**request:** `Merge.crm.GenerateRemoteKeyRequest` - -
-
- -
-
- -**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -11382,9 +13813,9 @@ await client.crm.generateKey.create({
-## Crm Issues +## Filestorage Users -
client.crm.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.filestorage.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -11396,7 +13827,7 @@ await client.crm.generateKey.create({
-Gets all issues for Organization. +Returns a list of `User` objects.
@@ -11412,7 +13843,7 @@ Gets all issues for Organization.
```typescript -await client.crm.issues.list({ +await client.filestorage.users.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11430,7 +13861,7 @@ await client.crm.issues.list({
-**request:** `Merge.crm.IssuesListRequest` +**request:** `Merge.filestorage.UsersListRequest`
@@ -11438,7 +13869,7 @@ await client.crm.issues.list({
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -11449,7 +13880,7 @@ await client.crm.issues.list({
-
client.crm.issues.retrieve(id) -> Merge.Issue +
client.filestorage.users.retrieve(id, { ...params }) -> Merge.User
@@ -11461,7 +13892,7 @@ await client.crm.issues.list({
-Get a specific issue. +Returns a `User` object with the given `id`.
@@ -11477,7 +13908,7 @@ Get a specific issue.
```typescript -await client.crm.issues.retrieve("id"); +await client.filestorage.users.retrieve("id"); ```
@@ -11501,7 +13932,15 @@ await client.crm.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**request:** `Merge.filestorage.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -11512,9 +13951,9 @@ await client.crm.issues.retrieve("id");
-## Crm Leads +## Filestorage WebhookReceivers -
client.crm.leads.list({ ...params }) -> Merge.PaginatedLeadList +
client.filestorage.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -11526,7 +13965,7 @@ await client.crm.issues.retrieve("id");
-Returns a list of `Lead` objects. +Returns a list of `WebhookReceiver` objects.
@@ -11542,9 +13981,7 @@ Returns a list of `Lead` objects.
```typescript -await client.crm.leads.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.filestorage.webhookReceivers.list(); ```
@@ -11560,15 +13997,7 @@ await client.crm.leads.list({
-**request:** `Merge.crm.LeadsListRequest` - -
-
- -
-
- -**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -11579,7 +14008,7 @@ await client.crm.leads.list({
-
client.crm.leads.create({ ...params }) -> Merge.LeadResponse +
client.filestorage.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -11591,7 +14020,7 @@ await client.crm.leads.list({
-Creates a `Lead` object with the given values. +Creates a `WebhookReceiver` object with the given values.
@@ -11607,8 +14036,9 @@ Creates a `Lead` object with the given values.
```typescript -await client.crm.leads.create({ - model: {}, +await client.filestorage.webhookReceivers.create({ + event: "event", + isActive: true, }); ``` @@ -11625,7 +14055,7 @@ await client.crm.leads.create({
-**request:** `Merge.crm.LeadEndpointRequest` +**request:** `Merge.filestorage.WebhookReceiverRequest`
@@ -11633,7 +14063,7 @@ await client.crm.leads.create({
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -11644,7 +14074,9 @@ await client.crm.leads.create({
-
client.crm.leads.retrieve(id, { ...params }) -> Merge.Lead +## Hris AccountDetails + +
client.hris.accountDetails.retrieve() -> Merge.AccountDetails
@@ -11656,7 +14088,7 @@ await client.crm.leads.create({
-Returns a `Lead` object with the given `id`. +Get details for a linked account.
@@ -11672,7 +14104,7 @@ Returns a `Lead` object with the given `id`.
```typescript -await client.crm.leads.retrieve("id"); +await client.hris.accountDetails.retrieve(); ```
@@ -11688,23 +14120,7 @@ await client.crm.leads.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.LeadsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -11715,7 +14131,9 @@ await client.crm.leads.retrieve("id");
-
client.crm.leads.metaPostRetrieve() -> Merge.MetaResponse +## Hris AccountToken + +
client.hris.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -11727,7 +14145,7 @@ await client.crm.leads.retrieve("id");
-Returns metadata for `Lead` POSTs. +Returns the account token for the end user with the provided public token.
@@ -11743,7 +14161,7 @@ Returns metadata for `Lead` POSTs.
```typescript -await client.crm.leads.metaPostRetrieve(); +await client.hris.accountToken.retrieve("public_token"); ```
@@ -11759,7 +14177,15 @@ await client.crm.leads.metaPostRetrieve();
-**requestOptions:** `Leads.RequestOptions` +**publicToken:** `string` + +
+
+ +
+
+ +**requestOptions:** `AccountToken.RequestOptions`
@@ -11770,7 +14196,9 @@ await client.crm.leads.metaPostRetrieve();
-
client.crm.leads.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Hris AsyncPassthrough + +
client.hris.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -11782,7 +14210,7 @@ await client.crm.leads.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -11798,8 +14226,9 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.leads.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.hris.asyncPassthrough.create({ + method: "GET", + path: "/scooters", }); ``` @@ -11816,7 +14245,7 @@ await client.crm.leads.remoteFieldClassesList({
-**request:** `Merge.crm.LeadsRemoteFieldClassesListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -11824,7 +14253,7 @@ await client.crm.leads.remoteFieldClassesList({
-**requestOptions:** `Leads.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -11835,9 +14264,7 @@ await client.crm.leads.remoteFieldClassesList({
-## Crm LinkToken - -
client.crm.linkToken.create({ ...params }) -> Merge.LinkToken +
client.hris.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -11849,7 +14276,7 @@ await client.crm.leads.remoteFieldClassesList({
-Creates a link token to be used when linking a new end user. +Retrieves data from earlier async-passthrough POST request
@@ -11865,12 +14292,7 @@ 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.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -11886,7 +14308,7 @@ await client.crm.linkToken.create({
-**request:** `Merge.crm.EndUserDetailsRequest` +**asyncPassthroughReceiptId:** `string`
@@ -11894,7 +14316,7 @@ await client.crm.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -11905,9 +14327,9 @@ await client.crm.linkToken.create({
-## Crm LinkedAccounts +## Hris AuditTrail -
client.crm.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.hris.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -11919,7 +14341,7 @@ await client.crm.linkToken.create({
-List linked accounts for your organization. +Gets a list of audit trail events.
@@ -11935,7 +14357,7 @@ List linked accounts for your organization.
```typescript -await client.crm.linkedAccounts.list({ +await client.hris.auditTrail.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -11953,7 +14375,7 @@ await client.crm.linkedAccounts.list({
-**request:** `Merge.crm.LinkedAccountsListRequest` +**request:** `Merge.hris.AuditTrailListRequest`
@@ -11961,7 +14383,7 @@ await client.crm.linkedAccounts.list({
-**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -11972,9 +14394,9 @@ await client.crm.linkedAccounts.list({
-## Crm Notes +## Hris AvailableActions -
client.crm.notes.list({ ...params }) -> Merge.PaginatedNoteList +
client.hris.availableActions.retrieve() -> Merge.AvailableActions
@@ -11986,7 +14408,7 @@ await client.crm.linkedAccounts.list({
-Returns a list of `Note` objects. +Returns a list of models and actions available for an account.
@@ -12002,9 +14424,7 @@ Returns a list of `Note` objects.
```typescript -await client.crm.notes.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.availableActions.retrieve(); ```
@@ -12020,15 +14440,7 @@ await client.crm.notes.list({
-**request:** `Merge.crm.NotesListRequest` - -
-
- -
-
- -**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -12039,7 +14451,9 @@ await client.crm.notes.list({
-
client.crm.notes.create({ ...params }) -> Merge.NoteResponse +## Hris BankInfo + +
client.hris.bankInfo.list({ ...params }) -> Merge.PaginatedBankInfoList
@@ -12051,7 +14465,7 @@ await client.crm.notes.list({
-Creates a `Note` object with the given values. +Returns a list of `BankInfo` objects.
@@ -12067,8 +14481,8 @@ Creates a `Note` object with the given values.
```typescript -await client.crm.notes.create({ - model: {}, +await client.hris.bankInfo.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12085,7 +14499,7 @@ await client.crm.notes.create({
-**request:** `Merge.crm.NoteEndpointRequest` +**request:** `Merge.hris.BankInfoListRequest`
@@ -12093,7 +14507,7 @@ await client.crm.notes.create({
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `BankInfo.RequestOptions`
@@ -12104,7 +14518,7 @@ await client.crm.notes.create({
-
client.crm.notes.retrieve(id, { ...params }) -> Merge.Note +
client.hris.bankInfo.retrieve(id, { ...params }) -> Merge.BankInfo
@@ -12116,7 +14530,7 @@ await client.crm.notes.create({
-Returns a `Note` object with the given `id`. +Returns a `BankInfo` object with the given `id`.
@@ -12132,7 +14546,7 @@ Returns a `Note` object with the given `id`.
```typescript -await client.crm.notes.retrieve("id"); +await client.hris.bankInfo.retrieve("id"); ```
@@ -12156,7 +14570,7 @@ await client.crm.notes.retrieve("id");
-**request:** `Merge.crm.NotesRetrieveRequest` +**request:** `Merge.hris.BankInfoRetrieveRequest`
@@ -12164,7 +14578,7 @@ await client.crm.notes.retrieve("id");
-**requestOptions:** `Notes.RequestOptions` +**requestOptions:** `BankInfo.RequestOptions`
@@ -12175,7 +14589,9 @@ await client.crm.notes.retrieve("id");
-
client.crm.notes.metaPostRetrieve() -> Merge.MetaResponse +## Hris Benefits + +
client.hris.benefits.list({ ...params }) -> Merge.PaginatedBenefitList
@@ -12187,7 +14603,7 @@ await client.crm.notes.retrieve("id");
-Returns metadata for `Note` POSTs. +Returns a list of `Benefit` objects.
@@ -12203,7 +14619,9 @@ Returns metadata for `Note` POSTs.
```typescript -await client.crm.notes.metaPostRetrieve(); +await client.hris.benefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -12219,7 +14637,15 @@ await client.crm.notes.metaPostRetrieve();
-**requestOptions:** `Notes.RequestOptions` +**request:** `Merge.hris.BenefitsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Benefits.RequestOptions`
@@ -12230,7 +14656,7 @@ await client.crm.notes.metaPostRetrieve();
-
client.crm.notes.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.hris.benefits.retrieve(id, { ...params }) -> Merge.Benefit
@@ -12242,7 +14668,7 @@ await client.crm.notes.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns a `Benefit` object with the given `id`.
@@ -12258,9 +14684,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.notes.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.benefits.retrieve("id"); ```
@@ -12276,7 +14700,7 @@ await client.crm.notes.remoteFieldClassesList({
-**request:** `Merge.crm.NotesRemoteFieldClassesListRequest` +**id:** `string`
@@ -12284,7 +14708,15 @@ await client.crm.notes.remoteFieldClassesList({
-**requestOptions:** `Notes.RequestOptions` +**request:** `Merge.hris.BenefitsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Benefits.RequestOptions`
@@ -12295,9 +14727,9 @@ await client.crm.notes.remoteFieldClassesList({
-## Crm Opportunities +## Hris Companies -
client.crm.opportunities.list({ ...params }) -> Merge.PaginatedOpportunityList +
client.hris.companies.list({ ...params }) -> Merge.PaginatedCompanyList
@@ -12309,7 +14741,7 @@ await client.crm.notes.remoteFieldClassesList({
-Returns a list of `Opportunity` objects. +Returns a list of `Company` objects.
@@ -12325,7 +14757,7 @@ Returns a list of `Opportunity` objects.
```typescript -await client.crm.opportunities.list({ +await client.hris.companies.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12343,7 +14775,7 @@ await client.crm.opportunities.list({
-**request:** `Merge.crm.OpportunitiesListRequest` +**request:** `Merge.hris.CompaniesListRequest`
@@ -12351,7 +14783,7 @@ await client.crm.opportunities.list({
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Companies.RequestOptions`
@@ -12362,7 +14794,7 @@ await client.crm.opportunities.list({
-
client.crm.opportunities.create({ ...params }) -> Merge.OpportunityResponse +
client.hris.companies.retrieve(id, { ...params }) -> Merge.Company
@@ -12374,7 +14806,7 @@ await client.crm.opportunities.list({
-Creates an `Opportunity` object with the given values. +Returns a `Company` object with the given `id`.
@@ -12390,9 +14822,7 @@ Creates an `Opportunity` object with the given values.
```typescript -await client.crm.opportunities.create({ - model: {}, -}); +await client.hris.companies.retrieve("id"); ```
@@ -12408,7 +14838,15 @@ await client.crm.opportunities.create({
-**request:** `Merge.crm.OpportunityEndpointRequest` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.CompaniesRetrieveRequest`
@@ -12416,7 +14854,7 @@ await client.crm.opportunities.create({
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Companies.RequestOptions`
@@ -12427,7 +14865,9 @@ await client.crm.opportunities.create({
-
client.crm.opportunities.retrieve(id, { ...params }) -> Merge.Opportunity +## Hris Scopes + +
client.hris.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -12439,7 +14879,7 @@ await client.crm.opportunities.create({
-Returns an `Opportunity` object with the given `id`. +Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -12455,7 +14895,7 @@ Returns an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.retrieve("id"); +await client.hris.scopes.defaultScopesRetrieve(); ```
@@ -12471,23 +14911,7 @@ await client.crm.opportunities.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.OpportunitiesRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -12498,7 +14922,7 @@ await client.crm.opportunities.retrieve("id");
-
client.crm.opportunities.partialUpdate(id, { ...params }) -> Merge.OpportunityResponse +
client.hris.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -12510,7 +14934,7 @@ await client.crm.opportunities.retrieve("id");
-Updates an `Opportunity` object with the given `id`. +Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
@@ -12526,9 +14950,7 @@ Updates an `Opportunity` object with the given `id`.
```typescript -await client.crm.opportunities.partialUpdate("id", { - model: {}, -}); +await client.hris.scopes.linkedAccountScopesRetrieve(); ```
@@ -12544,23 +14966,7 @@ await client.crm.opportunities.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedOpportunityEndpointRequest` - -
-
- -
-
- -**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -12571,7 +14977,7 @@ await client.crm.opportunities.partialUpdate("id", {
-
client.crm.opportunities.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.hris.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -12583,7 +14989,7 @@ await client.crm.opportunities.partialUpdate("id", {
-Returns metadata for `Opportunity` PATCHs. +Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
@@ -12599,7 +15005,33 @@ Returns metadata for `Opportunity` PATCHs.
```typescript -await client.crm.opportunities.metaPatchRetrieve("id"); +await client.hris.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, + }, + }, + }, + ], +}); ```
@@ -12615,7 +15047,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-**id:** `string` +**request:** `Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -12623,7 +15055,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -12634,7 +15066,9 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-
client.crm.opportunities.metaPostRetrieve() -> Merge.MetaResponse +## Hris DeleteAccount + +
client.hris.deleteAccount.delete() -> void
@@ -12646,7 +15080,7 @@ await client.crm.opportunities.metaPatchRetrieve("id");
-Returns metadata for `Opportunity` POSTs. +Delete a linked account.
@@ -12662,7 +15096,7 @@ Returns metadata for `Opportunity` POSTs.
```typescript -await client.crm.opportunities.metaPostRetrieve(); +await client.hris.deleteAccount.delete(); ```
@@ -12678,7 +15112,7 @@ await client.crm.opportunities.metaPostRetrieve();
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -12689,7 +15123,9 @@ await client.crm.opportunities.metaPostRetrieve();
-
client.crm.opportunities.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +## Hris Dependents + +
client.hris.dependents.list({ ...params }) -> Merge.PaginatedDependentList
@@ -12701,7 +15137,7 @@ await client.crm.opportunities.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Returns a list of `Dependent` objects.
@@ -12717,7 +15153,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.opportunities.remoteFieldClassesList({ +await client.hris.dependents.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12735,7 +15171,7 @@ await client.crm.opportunities.remoteFieldClassesList({
-**request:** `Merge.crm.OpportunitiesRemoteFieldClassesListRequest` +**request:** `Merge.hris.DependentsListRequest`
@@ -12743,7 +15179,7 @@ await client.crm.opportunities.remoteFieldClassesList({
-**requestOptions:** `Opportunities.RequestOptions` +**requestOptions:** `Dependents.RequestOptions`
@@ -12754,9 +15190,7 @@ await client.crm.opportunities.remoteFieldClassesList({
-## Crm Passthrough - -
client.crm.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.hris.dependents.retrieve(id, { ...params }) -> Merge.Dependent
@@ -12768,7 +15202,7 @@ await client.crm.opportunities.remoteFieldClassesList({
-Pull data from an endpoint not currently supported by Merge. +Returns a `Dependent` object with the given `id`.
@@ -12784,10 +15218,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.crm.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.hris.dependents.retrieve("id"); ```
@@ -12803,7 +15234,7 @@ await client.crm.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**id:** `string`
@@ -12811,7 +15242,15 @@ await client.crm.passthrough.create({
-**requestOptions:** `Passthrough.RequestOptions` +**request:** `Merge.hris.DependentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Dependents.RequestOptions`
@@ -12822,9 +15261,9 @@ await client.crm.passthrough.create({
-## Crm RegenerateKey +## Hris EmployeePayrollRuns -
client.crm.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.hris.employeePayrollRuns.list({ ...params }) -> Merge.PaginatedEmployeePayrollRunList
@@ -12836,7 +15275,7 @@ await client.crm.passthrough.create({
-Exchange remote keys. +Returns a list of `EmployeePayrollRun` objects.
@@ -12852,8 +15291,8 @@ Exchange remote keys.
```typescript -await client.crm.regenerateKey.create({ - name: "Remote Deployment Key 1", +await client.hris.employeePayrollRuns.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -12870,7 +15309,7 @@ await client.crm.regenerateKey.create({
-**request:** `Merge.crm.RemoteKeyForRegenerationRequest` +**request:** `Merge.hris.EmployeePayrollRunsListRequest`
@@ -12878,7 +15317,7 @@ await client.crm.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**requestOptions:** `EmployeePayrollRuns.RequestOptions`
@@ -12889,9 +15328,7 @@ await client.crm.regenerateKey.create({
-## Crm Stages - -
client.crm.stages.list({ ...params }) -> Merge.PaginatedStageList +
client.hris.employeePayrollRuns.retrieve(id, { ...params }) -> Merge.EmployeePayrollRun
@@ -12903,7 +15340,7 @@ await client.crm.regenerateKey.create({
-Returns a list of `Stage` objects. +Returns an `EmployeePayrollRun` object with the given `id`.
@@ -12919,9 +15356,7 @@ Returns a list of `Stage` objects.
```typescript -await client.crm.stages.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.employeePayrollRuns.retrieve("id"); ```
@@ -12937,7 +15372,7 @@ await client.crm.stages.list({
-**request:** `Merge.crm.StagesListRequest` +**id:** `string`
@@ -12945,7 +15380,15 @@ await client.crm.stages.list({
-**requestOptions:** `Stages.RequestOptions` +**request:** `Merge.hris.EmployeePayrollRunsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `EmployeePayrollRuns.RequestOptions`
@@ -12956,7 +15399,9 @@ await client.crm.stages.list({
-
client.crm.stages.retrieve(id, { ...params }) -> Merge.Stage +## Hris Employees + +
client.hris.employees.list({ ...params }) -> Merge.PaginatedEmployeeList
@@ -12968,7 +15413,7 @@ await client.crm.stages.list({
-Returns a `Stage` object with the given `id`. +Returns a list of `Employee` objects.
@@ -12984,7 +15429,9 @@ Returns a `Stage` object with the given `id`.
```typescript -await client.crm.stages.retrieve("id"); +await client.hris.employees.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -13000,15 +15447,7 @@ await client.crm.stages.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.StagesRetrieveRequest` +**request:** `Merge.hris.EmployeesListRequest`
@@ -13016,7 +15455,7 @@ await client.crm.stages.retrieve("id");
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `Employees.RequestOptions`
@@ -13027,7 +15466,7 @@ await client.crm.stages.retrieve("id");
-
client.crm.stages.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.hris.employees.create({ ...params }) -> Merge.EmployeeResponse
@@ -13039,7 +15478,7 @@ await client.crm.stages.retrieve("id");
-Returns a list of `RemoteFieldClass` objects. +Creates an `Employee` object with the given values.
@@ -13055,8 +15494,8 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.stages.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.hris.employees.create({ + model: {}, }); ``` @@ -13073,7 +15512,7 @@ await client.crm.stages.remoteFieldClassesList({
-**request:** `Merge.crm.StagesRemoteFieldClassesListRequest` +**request:** `Merge.hris.EmployeeEndpointRequest`
@@ -13081,7 +15520,7 @@ await client.crm.stages.remoteFieldClassesList({
-**requestOptions:** `Stages.RequestOptions` +**requestOptions:** `Employees.RequestOptions`
@@ -13092,9 +15531,7 @@ await client.crm.stages.remoteFieldClassesList({
-## Crm SyncStatus - -
client.crm.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.hris.employees.retrieve(id, { ...params }) -> Merge.Employee
@@ -13106,7 +15543,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 an `Employee` object with the given `id`.
@@ -13122,9 +15559,7 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.crm.syncStatus.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.employees.retrieve("id"); ```
@@ -13140,7 +15575,7 @@ await client.crm.syncStatus.list({
-**request:** `Merge.crm.SyncStatusListRequest` +**id:** `string`
@@ -13148,7 +15583,15 @@ await client.crm.syncStatus.list({
-**requestOptions:** `SyncStatus.RequestOptions` +**request:** `Merge.hris.EmployeesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions`
@@ -13159,9 +15602,7 @@ await client.crm.syncStatus.list({
-## Crm ForceResync - -
client.crm.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.hris.employees.ignoreCreate(modelId, { ...params }) -> void
@@ -13173,7 +15614,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. +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.
@@ -13189,7 +15630,9 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.crm.forceResync.syncStatusResyncCreate(); +await client.hris.employees.ignoreCreate("model_id", { + reason: "GENERAL_CUSTOMER_REQUEST", +}); ```
@@ -13205,7 +15648,23 @@ await client.crm.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.IgnoreCommonModelRequest` + +
+
+ +
+
+ +**requestOptions:** `Employees.RequestOptions`
@@ -13216,9 +15675,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-## Crm Tasks - -
client.crm.tasks.list({ ...params }) -> Merge.PaginatedTaskList +
client.hris.employees.metaPostRetrieve() -> Merge.MetaResponse
@@ -13230,7 +15687,7 @@ await client.crm.forceResync.syncStatusResyncCreate();
-Returns a list of `Task` objects. +Returns metadata for `Employee` POSTs.
@@ -13246,9 +15703,7 @@ Returns a list of `Task` objects.
```typescript -await client.crm.tasks.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.employees.metaPostRetrieve(); ```
@@ -13264,15 +15719,7 @@ await client.crm.tasks.list({
-**request:** `Merge.crm.TasksListRequest` - -
-
- -
-
- -**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Employees.RequestOptions`
@@ -13283,7 +15730,9 @@ await client.crm.tasks.list({
-
client.crm.tasks.create({ ...params }) -> Merge.TaskResponse +## Hris EmployerBenefits + +
client.hris.employerBenefits.list({ ...params }) -> Merge.PaginatedEmployerBenefitList
@@ -13295,7 +15744,7 @@ await client.crm.tasks.list({
-Creates a `Task` object with the given values. +Returns a list of `EmployerBenefit` objects.
@@ -13311,8 +15760,8 @@ Creates a `Task` object with the given values.
```typescript -await client.crm.tasks.create({ - model: {}, +await client.hris.employerBenefits.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -13329,7 +15778,7 @@ await client.crm.tasks.create({
-**request:** `Merge.crm.TaskEndpointRequest` +**request:** `Merge.hris.EmployerBenefitsListRequest`
@@ -13337,7 +15786,7 @@ await client.crm.tasks.create({
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `EmployerBenefits.RequestOptions`
@@ -13348,7 +15797,7 @@ await client.crm.tasks.create({
-
client.crm.tasks.retrieve(id, { ...params }) -> Merge.Task +
client.hris.employerBenefits.retrieve(id, { ...params }) -> Merge.EmployerBenefit
@@ -13360,7 +15809,7 @@ await client.crm.tasks.create({
-Returns a `Task` object with the given `id`. +Returns an `EmployerBenefit` object with the given `id`.
@@ -13376,7 +15825,7 @@ Returns a `Task` object with the given `id`.
```typescript -await client.crm.tasks.retrieve("id"); +await client.hris.employerBenefits.retrieve("id"); ```
@@ -13400,7 +15849,7 @@ await client.crm.tasks.retrieve("id");
-**request:** `Merge.crm.TasksRetrieveRequest` +**request:** `Merge.hris.EmployerBenefitsRetrieveRequest`
@@ -13408,7 +15857,7 @@ await client.crm.tasks.retrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `EmployerBenefits.RequestOptions`
@@ -13419,7 +15868,9 @@ await client.crm.tasks.retrieve("id");
-
client.crm.tasks.partialUpdate(id, { ...params }) -> Merge.TaskResponse +## Hris Employments + +
client.hris.employments.list({ ...params }) -> Merge.PaginatedEmploymentList
@@ -13431,7 +15882,7 @@ await client.crm.tasks.retrieve("id");
-Updates a `Task` object with the given `id`. +Returns a list of `Employment` objects.
@@ -13447,8 +15898,8 @@ Updates a `Task` object with the given `id`.
```typescript -await client.crm.tasks.partialUpdate("id", { - model: {}, +await client.hris.employments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -13465,15 +15916,7 @@ await client.crm.tasks.partialUpdate("id", {
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.crm.PatchedTaskEndpointRequest` +**request:** `Merge.hris.EmploymentsListRequest`
@@ -13481,7 +15924,7 @@ await client.crm.tasks.partialUpdate("id", {
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `Employments.RequestOptions`
@@ -13492,7 +15935,7 @@ await client.crm.tasks.partialUpdate("id", {
-
client.crm.tasks.metaPatchRetrieve(id) -> Merge.MetaResponse +
client.hris.employments.retrieve(id, { ...params }) -> Merge.Employment
@@ -13504,7 +15947,7 @@ await client.crm.tasks.partialUpdate("id", {
-Returns metadata for `Task` PATCHs. +Returns an `Employment` object with the given `id`.
@@ -13520,7 +15963,7 @@ Returns metadata for `Task` PATCHs.
```typescript -await client.crm.tasks.metaPatchRetrieve("id"); +await client.hris.employments.retrieve("id"); ```
@@ -13544,7 +15987,15 @@ await client.crm.tasks.metaPatchRetrieve("id");
-**requestOptions:** `Tasks.RequestOptions` +**request:** `Merge.hris.EmploymentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Employments.RequestOptions`
@@ -13555,7 +16006,9 @@ await client.crm.tasks.metaPatchRetrieve("id");
-
client.crm.tasks.metaPostRetrieve() -> Merge.MetaResponse +## Hris FieldMapping + +
client.hris.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -13567,7 +16020,7 @@ await client.crm.tasks.metaPatchRetrieve("id");
-Returns metadata for `Task` POSTs. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -13583,7 +16036,7 @@ Returns metadata for `Task` POSTs.
```typescript -await client.crm.tasks.metaPostRetrieve(); +await client.hris.fieldMapping.fieldMappingsRetrieve(); ```
@@ -13599,7 +16052,15 @@ await client.crm.tasks.metaPostRetrieve();
-**requestOptions:** `Tasks.RequestOptions` +**request:** `Merge.hris.FieldMappingsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13610,7 +16071,7 @@ await client.crm.tasks.metaPostRetrieve();
-
client.crm.tasks.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.hris.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -13622,7 +16083,7 @@ await client.crm.tasks.metaPostRetrieve();
-Returns a list of `RemoteFieldClass` objects. +Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -13638,8 +16099,13 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.tasks.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.hris.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", }); ``` @@ -13656,7 +16122,7 @@ await client.crm.tasks.remoteFieldClassesList({
-**request:** `Merge.crm.TasksRemoteFieldClassesListRequest` +**request:** `Merge.hris.CreateFieldMappingRequest`
@@ -13664,7 +16130,7 @@ await client.crm.tasks.remoteFieldClassesList({
-**requestOptions:** `Tasks.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13675,9 +16141,7 @@ await client.crm.tasks.remoteFieldClassesList({
-## Crm Users - -
client.crm.users.list({ ...params }) -> Merge.PaginatedUserList +
client.hris.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -13689,7 +16153,7 @@ await client.crm.tasks.remoteFieldClassesList({
-Returns a list of `User` 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.
@@ -13705,9 +16169,7 @@ Returns a list of `User` objects.
```typescript -await client.crm.users.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -13723,7 +16185,7 @@ await client.crm.users.list({
-**request:** `Merge.crm.UsersListRequest` +**fieldMappingId:** `string`
@@ -13731,7 +16193,7 @@ await client.crm.users.list({
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13742,7 +16204,7 @@ await client.crm.users.list({
-
client.crm.users.retrieve(id, { ...params }) -> Merge.User +
client.hris.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -13754,7 +16216,7 @@ await client.crm.users.list({
-Returns a `User` 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.
@@ -13770,7 +16232,7 @@ Returns a `User` object with the given `id`.
```typescript -await client.crm.users.retrieve("id"); +await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -13786,7 +16248,7 @@ await client.crm.users.retrieve("id");
-**id:** `string` +**fieldMappingId:** `string`
@@ -13794,7 +16256,7 @@ await client.crm.users.retrieve("id");
-**request:** `Merge.crm.UsersRetrieveRequest` +**request:** `Merge.hris.PatchedEditFieldMappingRequest`
@@ -13802,7 +16264,7 @@ await client.crm.users.retrieve("id");
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13813,7 +16275,7 @@ await client.crm.users.retrieve("id");
-
client.crm.users.ignoreCreate(modelId, { ...params }) -> void +
client.hris.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -13825,7 +16287,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. +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/).
@@ -13841,9 +16303,7 @@ 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.hris.fieldMapping.remoteFieldsRetrieve(); ```
@@ -13859,15 +16319,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.IgnoreCommonModelRequest` +**request:** `Merge.hris.RemoteFieldsRetrieveRequest`
@@ -13875,7 +16327,7 @@ await client.crm.users.ignoreCreate("model_id", {
-**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13886,7 +16338,7 @@ await client.crm.users.ignoreCreate("model_id", {
-
client.crm.users.remoteFieldClassesList({ ...params }) -> Merge.PaginatedRemoteFieldClassList +
client.hris.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -13898,7 +16350,7 @@ await client.crm.users.ignoreCreate("model_id", {
-Returns a list of `RemoteFieldClass` objects. +Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
@@ -13914,9 +16366,7 @@ Returns a list of `RemoteFieldClass` objects.
```typescript -await client.crm.users.remoteFieldClassesList({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.fieldMapping.targetFieldsRetrieve(); ```
@@ -13932,15 +16382,7 @@ await client.crm.users.remoteFieldClassesList({
-**request:** `Merge.crm.UsersRemoteFieldClassesListRequest` - -
-
- -
-
- -**requestOptions:** `Users.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -13951,9 +16393,9 @@ await client.crm.users.remoteFieldClassesList({
-## Crm WebhookReceivers +## Hris GenerateKey -
client.crm.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.hris.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -13965,7 +16407,7 @@ await client.crm.users.remoteFieldClassesList({
-Returns a list of `WebhookReceiver` objects. +Create a remote key.
@@ -13981,7 +16423,9 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.crm.webhookReceivers.list(); +await client.hris.generateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -13997,7 +16441,15 @@ await client.crm.webhookReceivers.list();
-**requestOptions:** `WebhookReceivers.RequestOptions` +**request:** `Merge.hris.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions`
@@ -14008,7 +16460,9 @@ await client.crm.webhookReceivers.list();
-
client.crm.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +## Hris Groups + +
client.hris.groups.list({ ...params }) -> Merge.PaginatedGroupList
@@ -14020,7 +16474,7 @@ await client.crm.webhookReceivers.list();
-Creates a `WebhookReceiver` object with the given values. +Returns a list of `Group` objects.
@@ -14036,9 +16490,8 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.crm.webhookReceivers.create({ - event: "event", - isActive: true, +await client.hris.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -14055,7 +16508,7 @@ await client.crm.webhookReceivers.create({
-**request:** `Merge.crm.WebhookReceiverRequest` +**request:** `Merge.hris.GroupsListRequest`
@@ -14063,7 +16516,7 @@ await client.crm.webhookReceivers.create({
-**requestOptions:** `WebhookReceivers.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -14074,9 +16527,7 @@ await client.crm.webhookReceivers.create({
-## Hris AccountDetails - -
client.hris.accountDetails.retrieve() -> Merge.AccountDetails +
client.hris.groups.retrieve(id, { ...params }) -> Merge.Group
@@ -14088,7 +16539,7 @@ await client.crm.webhookReceivers.create({
-Get details for a linked account. +Returns a `Group` object with the given `id`.
@@ -14104,7 +16555,7 @@ Get details for a linked account.
```typescript -await client.hris.accountDetails.retrieve(); +await client.hris.groups.retrieve("id"); ```
@@ -14120,7 +16571,23 @@ await client.hris.accountDetails.retrieve();
-**requestOptions:** `AccountDetails.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.hris.GroupsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Groups.RequestOptions`
@@ -14131,9 +16598,9 @@ await client.hris.accountDetails.retrieve();
-## Hris AccountToken +## Hris Issues -
client.hris.accountToken.retrieve(publicToken) -> Merge.AccountToken +
client.hris.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -14145,7 +16612,7 @@ await client.hris.accountDetails.retrieve();
-Returns the account token for the end user with the provided public token. +Gets all issues for Organization.
@@ -14161,7 +16628,9 @@ Returns the account token for the end user with the provided public token.
```typescript -await client.hris.accountToken.retrieve("public_token"); +await client.hris.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14177,7 +16646,7 @@ await client.hris.accountToken.retrieve("public_token");
-**publicToken:** `string` +**request:** `Merge.hris.IssuesListRequest`
@@ -14185,7 +16654,7 @@ await client.hris.accountToken.retrieve("public_token");
-**requestOptions:** `AccountToken.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -14196,9 +16665,7 @@ await client.hris.accountToken.retrieve("public_token");
-## Hris AsyncPassthrough - -
client.hris.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept +
client.hris.issues.retrieve(id) -> Merge.Issue
@@ -14210,7 +16677,7 @@ await client.hris.accountToken.retrieve("public_token");
-Asynchronously pull data from an endpoint not currently supported by Merge. +Get a specific issue.
@@ -14226,10 +16693,7 @@ Asynchronously pull data from an endpoint not currently supported by Merge.
```typescript -await client.hris.asyncPassthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.hris.issues.retrieve("id"); ```
@@ -14245,7 +16709,7 @@ await client.hris.asyncPassthrough.create({
-**request:** `Merge.DataPassthroughRequest` +**id:** `string`
@@ -14253,7 +16717,7 @@ await client.hris.asyncPassthrough.create({
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -14264,7 +16728,9 @@ await client.hris.asyncPassthrough.create({
-
client.hris.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse +## Hris LinkToken + +
client.hris.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -14276,7 +16742,7 @@ await client.hris.asyncPassthrough.create({
-Retrieves data from earlier async-passthrough POST request +Creates a link token to be used when linking a new end user.
@@ -14292,7 +16758,12 @@ Retrieves data from earlier async-passthrough POST request
```typescript -await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id"); +await client.hris.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -14308,7 +16779,7 @@ await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**asyncPassthroughReceiptId:** `string` +**request:** `Merge.hris.EndUserDetailsRequest`
@@ -14316,7 +16787,7 @@ await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-**requestOptions:** `AsyncPassthrough.RequestOptions` +**requestOptions:** `LinkToken.RequestOptions`
@@ -14327,9 +16798,9 @@ await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-## Hris AuditTrail +## Hris LinkedAccounts -
client.hris.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList +
client.hris.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -14341,7 +16812,7 @@ await client.hris.asyncPassthrough.retrieve("async_passthrough_receipt_id");
-Gets a list of audit trail events. +List linked accounts for your organization.
@@ -14357,7 +16828,7 @@ Gets a list of audit trail events.
```typescript -await client.hris.auditTrail.list({ +await client.hris.linkedAccounts.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -14375,7 +16846,7 @@ await client.hris.auditTrail.list({
-**request:** `Merge.hris.AuditTrailListRequest` +**request:** `Merge.hris.LinkedAccountsListRequest`
@@ -14383,7 +16854,7 @@ await client.hris.auditTrail.list({
-**requestOptions:** `AuditTrail.RequestOptions` +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -14394,9 +16865,9 @@ await client.hris.auditTrail.list({
-## Hris AvailableActions +## Hris Locations -
client.hris.availableActions.retrieve() -> Merge.AvailableActions +
client.hris.locations.list({ ...params }) -> Merge.PaginatedLocationList
@@ -14408,7 +16879,7 @@ await client.hris.auditTrail.list({
-Returns a list of models and actions available for an account. +Returns a list of `Location` objects.
@@ -14424,7 +16895,9 @@ Returns a list of models and actions available for an account.
```typescript -await client.hris.availableActions.retrieve(); +await client.hris.locations.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14440,7 +16913,15 @@ await client.hris.availableActions.retrieve();
-**requestOptions:** `AvailableActions.RequestOptions` +**request:** `Merge.hris.LocationsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Locations.RequestOptions`
@@ -14451,9 +16932,7 @@ await client.hris.availableActions.retrieve();
-## Hris BankInfo - -
client.hris.bankInfo.list({ ...params }) -> Merge.PaginatedBankInfoList +
client.hris.locations.retrieve(id, { ...params }) -> Merge.Location
@@ -14465,7 +16944,7 @@ await client.hris.availableActions.retrieve();
-Returns a list of `BankInfo` objects. +Returns a `Location` object with the given `id`.
@@ -14481,9 +16960,7 @@ Returns a list of `BankInfo` objects.
```typescript -await client.hris.bankInfo.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.locations.retrieve("id"); ```
@@ -14499,7 +16976,7 @@ await client.hris.bankInfo.list({
-**request:** `Merge.hris.BankInfoListRequest` +**id:** `string`
@@ -14507,7 +16984,15 @@ await client.hris.bankInfo.list({
-**requestOptions:** `BankInfo.RequestOptions` +**request:** `Merge.hris.LocationsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Locations.RequestOptions`
@@ -14518,7 +17003,9 @@ await client.hris.bankInfo.list({
-
client.hris.bankInfo.retrieve(id, { ...params }) -> Merge.BankInfo +## Hris Passthrough + +
client.hris.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -14530,7 +17017,7 @@ await client.hris.bankInfo.list({
-Returns a `BankInfo` object with the given `id`. +Pull data from an endpoint not currently supported by Merge.
@@ -14546,7 +17033,10 @@ Returns a `BankInfo` object with the given `id`.
```typescript -await client.hris.bankInfo.retrieve("id"); +await client.hris.passthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -14562,15 +17052,7 @@ await client.hris.bankInfo.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.BankInfoRetrieveRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -14578,7 +17060,7 @@ await client.hris.bankInfo.retrieve("id");
-**requestOptions:** `BankInfo.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -14589,9 +17071,9 @@ await client.hris.bankInfo.retrieve("id");
-## Hris Benefits +## Hris PayGroups -
client.hris.benefits.list({ ...params }) -> Merge.PaginatedBenefitList +
client.hris.payGroups.list({ ...params }) -> Merge.PaginatedPayGroupList
@@ -14603,7 +17085,7 @@ await client.hris.bankInfo.retrieve("id");
-Returns a list of `Benefit` objects. +Returns a list of `PayGroup` objects.
@@ -14619,7 +17101,7 @@ Returns a list of `Benefit` objects.
```typescript -await client.hris.benefits.list({ +await client.hris.payGroups.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -14637,7 +17119,7 @@ await client.hris.benefits.list({
-**request:** `Merge.hris.BenefitsListRequest` +**request:** `Merge.hris.PayGroupsListRequest`
@@ -14645,7 +17127,7 @@ await client.hris.benefits.list({
-**requestOptions:** `Benefits.RequestOptions` +**requestOptions:** `PayGroups.RequestOptions`
@@ -14656,7 +17138,7 @@ await client.hris.benefits.list({
-
client.hris.benefits.retrieve(id, { ...params }) -> Merge.Benefit +
client.hris.payGroups.retrieve(id, { ...params }) -> Merge.PayGroup
@@ -14668,7 +17150,7 @@ await client.hris.benefits.list({
-Returns a `Benefit` object with the given `id`. +Returns a `PayGroup` object with the given `id`.
@@ -14684,7 +17166,7 @@ Returns a `Benefit` object with the given `id`.
```typescript -await client.hris.benefits.retrieve("id"); +await client.hris.payGroups.retrieve("id"); ```
@@ -14708,7 +17190,7 @@ await client.hris.benefits.retrieve("id");
-**request:** `Merge.hris.BenefitsRetrieveRequest` +**request:** `Merge.hris.PayGroupsRetrieveRequest`
@@ -14716,7 +17198,7 @@ await client.hris.benefits.retrieve("id");
-**requestOptions:** `Benefits.RequestOptions` +**requestOptions:** `PayGroups.RequestOptions`
@@ -14727,9 +17209,9 @@ await client.hris.benefits.retrieve("id");
-## Hris Companies +## Hris PayrollRuns -
client.hris.companies.list({ ...params }) -> Merge.PaginatedCompanyList +
client.hris.payrollRuns.list({ ...params }) -> Merge.PaginatedPayrollRunList
@@ -14741,7 +17223,7 @@ await client.hris.benefits.retrieve("id");
-Returns a list of `Company` objects. +Returns a list of `PayrollRun` objects.
@@ -14757,7 +17239,7 @@ Returns a list of `Company` objects.
```typescript -await client.hris.companies.list({ +await client.hris.payrollRuns.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -14775,7 +17257,7 @@ await client.hris.companies.list({
-**request:** `Merge.hris.CompaniesListRequest` +**request:** `Merge.hris.PayrollRunsListRequest`
@@ -14783,7 +17265,7 @@ await client.hris.companies.list({
-**requestOptions:** `Companies.RequestOptions` +**requestOptions:** `PayrollRuns.RequestOptions`
@@ -14794,7 +17276,7 @@ await client.hris.companies.list({
-
client.hris.companies.retrieve(id, { ...params }) -> Merge.Company +
client.hris.payrollRuns.retrieve(id, { ...params }) -> Merge.PayrollRun
@@ -14806,7 +17288,7 @@ await client.hris.companies.list({
-Returns a `Company` object with the given `id`. +Returns a `PayrollRun` object with the given `id`.
@@ -14822,7 +17304,7 @@ Returns a `Company` object with the given `id`.
```typescript -await client.hris.companies.retrieve("id"); +await client.hris.payrollRuns.retrieve("id"); ```
@@ -14846,7 +17328,7 @@ await client.hris.companies.retrieve("id");
-**request:** `Merge.hris.CompaniesRetrieveRequest` +**request:** `Merge.hris.PayrollRunsRetrieveRequest`
@@ -14854,7 +17336,7 @@ await client.hris.companies.retrieve("id");
-**requestOptions:** `Companies.RequestOptions` +**requestOptions:** `PayrollRuns.RequestOptions`
@@ -14865,9 +17347,9 @@ await client.hris.companies.retrieve("id");
-## Hris Scopes +## Hris RegenerateKey -
client.hris.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi +
client.hris.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -14879,7 +17361,7 @@ await client.hris.companies.retrieve("id");
-Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). +Exchange remote keys.
@@ -14895,7 +17377,9 @@ Get the default permissions for Merge Common Models and fields across all Linked
```typescript -await client.hris.scopes.defaultScopesRetrieve(); +await client.hris.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -14911,7 +17395,15 @@ await client.hris.scopes.defaultScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.hris.RemoteKeyForRegenerationRequest` + +
+
+ +
+
+ +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -14922,7 +17414,9 @@ await client.hris.scopes.defaultScopesRetrieve();
-
client.hris.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi +## Hris SyncStatus + +
client.hris.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -14934,7 +17428,7 @@ await client.hris.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). +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).
@@ -14950,7 +17444,9 @@ Get all available permissions for Merge Common Models and fields for a single Li
```typescript -await client.hris.scopes.linkedAccountScopesRetrieve(); +await client.hris.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -14966,7 +17462,15 @@ await client.hris.scopes.linkedAccountScopesRetrieve();
-**requestOptions:** `Scopes.RequestOptions` +**request:** `Merge.hris.SyncStatusListRequest` + +
+
+ +
+
+ +**requestOptions:** `SyncStatus.RequestOptions`
@@ -14977,7 +17481,9 @@ await client.hris.scopes.linkedAccountScopesRetrieve();
-
client.hris.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi +## Hris ForceResync + +
client.hris.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -14989,7 +17495,7 @@ await client.hris.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) +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.
@@ -15005,33 +17511,7 @@ Update permissions for any Common Model or field for a single Linked Account. An
```typescript -await client.hris.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.hris.forceResync.syncStatusResyncCreate(); ```
@@ -15047,15 +17527,7 @@ await client.hris.scopes.linkedAccountScopesCreate({
-**request:** `Merge.hris.LinkedAccountCommonModelScopeDeserializerRequest` - -
-
- -
-
- -**requestOptions:** `Scopes.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -15066,9 +17538,9 @@ await client.hris.scopes.linkedAccountScopesCreate({
-## Hris DeleteAccount +## Hris Teams -
client.hris.deleteAccount.delete() -> void +
client.hris.teams.list({ ...params }) -> Merge.PaginatedTeamList
@@ -15080,7 +17552,7 @@ await client.hris.scopes.linkedAccountScopesCreate({
-Delete a linked account. +Returns a list of `Team` objects.
@@ -15096,7 +17568,9 @@ Delete a linked account.
```typescript -await client.hris.deleteAccount.delete(); +await client.hris.teams.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15112,7 +17586,15 @@ await client.hris.deleteAccount.delete();
-**requestOptions:** `DeleteAccount.RequestOptions` +**request:** `Merge.hris.TeamsListRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions`
@@ -15123,9 +17605,7 @@ await client.hris.deleteAccount.delete();
-## Hris Dependents - -
client.hris.dependents.list({ ...params }) -> Merge.PaginatedDependentList +
client.hris.teams.retrieve(id, { ...params }) -> Merge.Team
@@ -15137,7 +17617,7 @@ await client.hris.deleteAccount.delete();
-Returns a list of `Dependent` objects. +Returns a `Team` object with the given `id`.
@@ -15153,9 +17633,7 @@ Returns a list of `Dependent` objects.
```typescript -await client.hris.dependents.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.teams.retrieve("id"); ```
@@ -15171,7 +17649,7 @@ await client.hris.dependents.list({
-**request:** `Merge.hris.DependentsListRequest` +**id:** `string`
@@ -15179,7 +17657,15 @@ await client.hris.dependents.list({
-**requestOptions:** `Dependents.RequestOptions` +**request:** `Merge.hris.TeamsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Teams.RequestOptions`
@@ -15190,7 +17676,9 @@ await client.hris.dependents.list({
-
client.hris.dependents.retrieve(id, { ...params }) -> Merge.Dependent +## Hris TimeOff + +
client.hris.timeOff.list({ ...params }) -> Merge.PaginatedTimeOffList
@@ -15202,7 +17690,7 @@ await client.hris.dependents.list({
-Returns a `Dependent` object with the given `id`. +Returns a list of `TimeOff` objects.
@@ -15218,7 +17706,9 @@ Returns a `Dependent` object with the given `id`.
```typescript -await client.hris.dependents.retrieve("id"); +await client.hris.timeOff.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -15234,15 +17724,7 @@ await client.hris.dependents.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.DependentsRetrieveRequest` +**request:** `Merge.hris.TimeOffListRequest`
@@ -15250,7 +17732,7 @@ await client.hris.dependents.retrieve("id");
-**requestOptions:** `Dependents.RequestOptions` +**requestOptions:** `TimeOff.RequestOptions`
@@ -15261,9 +17743,7 @@ await client.hris.dependents.retrieve("id");
-## Hris EmployeePayrollRuns - -
client.hris.employeePayrollRuns.list({ ...params }) -> Merge.PaginatedEmployeePayrollRunList +
client.hris.timeOff.create({ ...params }) -> Merge.TimeOffResponse
@@ -15275,7 +17755,7 @@ await client.hris.dependents.retrieve("id");
-Returns a list of `EmployeePayrollRun` objects. +Creates a `TimeOff` object with the given values.
@@ -15291,8 +17771,8 @@ Returns a list of `EmployeePayrollRun` objects.
```typescript -await client.hris.employeePayrollRuns.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.hris.timeOff.create({ + model: {}, }); ``` @@ -15309,7 +17789,7 @@ await client.hris.employeePayrollRuns.list({
-**request:** `Merge.hris.EmployeePayrollRunsListRequest` +**request:** `Merge.hris.TimeOffEndpointRequest`
@@ -15317,7 +17797,7 @@ await client.hris.employeePayrollRuns.list({
-**requestOptions:** `EmployeePayrollRuns.RequestOptions` +**requestOptions:** `TimeOff.RequestOptions`
@@ -15328,7 +17808,7 @@ await client.hris.employeePayrollRuns.list({
-
client.hris.employeePayrollRuns.retrieve(id, { ...params }) -> Merge.EmployeePayrollRun +
client.hris.timeOff.retrieve(id, { ...params }) -> Merge.TimeOff
@@ -15340,7 +17820,7 @@ await client.hris.employeePayrollRuns.list({
-Returns an `EmployeePayrollRun` object with the given `id`. +Returns a `TimeOff` object with the given `id`.
@@ -15356,7 +17836,7 @@ Returns an `EmployeePayrollRun` object with the given `id`.
```typescript -await client.hris.employeePayrollRuns.retrieve("id"); +await client.hris.timeOff.retrieve("id"); ```
@@ -15380,7 +17860,7 @@ await client.hris.employeePayrollRuns.retrieve("id");
-**request:** `Merge.hris.EmployeePayrollRunsRetrieveRequest` +**request:** `Merge.hris.TimeOffRetrieveRequest`
@@ -15388,7 +17868,7 @@ await client.hris.employeePayrollRuns.retrieve("id");
-**requestOptions:** `EmployeePayrollRuns.RequestOptions` +**requestOptions:** `TimeOff.RequestOptions`
@@ -15399,9 +17879,7 @@ await client.hris.employeePayrollRuns.retrieve("id");
-## Hris Employees - -
client.hris.employees.list({ ...params }) -> Merge.PaginatedEmployeeList +
client.hris.timeOff.metaPostRetrieve() -> Merge.MetaResponse
@@ -15413,7 +17891,7 @@ await client.hris.employeePayrollRuns.retrieve("id");
-Returns a list of `Employee` objects. +Returns metadata for `TimeOff` POSTs.
@@ -15429,9 +17907,7 @@ Returns a list of `Employee` objects.
```typescript -await client.hris.employees.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.timeOff.metaPostRetrieve(); ```
@@ -15447,15 +17923,7 @@ await client.hris.employees.list({
-**request:** `Merge.hris.EmployeesListRequest` - -
-
- -
-
- -**requestOptions:** `Employees.RequestOptions` +**requestOptions:** `TimeOff.RequestOptions`
@@ -15466,7 +17934,9 @@ await client.hris.employees.list({
-
client.hris.employees.create({ ...params }) -> Merge.EmployeeResponse +## Hris TimeOffBalances + +
client.hris.timeOffBalances.list({ ...params }) -> Merge.PaginatedTimeOffBalanceList
@@ -15478,7 +17948,7 @@ await client.hris.employees.list({
-Creates an `Employee` object with the given values. +Returns a list of `TimeOffBalance` objects.
@@ -15494,8 +17964,8 @@ Creates an `Employee` object with the given values.
```typescript -await client.hris.employees.create({ - model: {}, +await client.hris.timeOffBalances.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -15512,7 +17982,7 @@ await client.hris.employees.create({
-**request:** `Merge.hris.EmployeeEndpointRequest` +**request:** `Merge.hris.TimeOffBalancesListRequest`
@@ -15520,7 +17990,7 @@ await client.hris.employees.create({
-**requestOptions:** `Employees.RequestOptions` +**requestOptions:** `TimeOffBalances.RequestOptions`
@@ -15531,7 +18001,7 @@ await client.hris.employees.create({
-
client.hris.employees.retrieve(id, { ...params }) -> Merge.Employee +
client.hris.timeOffBalances.retrieve(id, { ...params }) -> Merge.TimeOffBalance
@@ -15543,7 +18013,7 @@ await client.hris.employees.create({
-Returns an `Employee` object with the given `id`. +Returns a `TimeOffBalance` object with the given `id`.
@@ -15559,7 +18029,7 @@ Returns an `Employee` object with the given `id`.
```typescript -await client.hris.employees.retrieve("id"); +await client.hris.timeOffBalances.retrieve("id"); ```
@@ -15583,7 +18053,7 @@ await client.hris.employees.retrieve("id");
-**request:** `Merge.hris.EmployeesRetrieveRequest` +**request:** `Merge.hris.TimeOffBalancesRetrieveRequest`
@@ -15591,7 +18061,7 @@ await client.hris.employees.retrieve("id");
-**requestOptions:** `Employees.RequestOptions` +**requestOptions:** `TimeOffBalances.RequestOptions`
@@ -15602,7 +18072,9 @@ await client.hris.employees.retrieve("id");
-
client.hris.employees.ignoreCreate(modelId, { ...params }) -> void +## Hris TimesheetEntries + +
client.hris.timesheetEntries.list({ ...params }) -> Merge.PaginatedTimesheetEntryList
@@ -15614,7 +18086,7 @@ await client.hris.employees.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. +Returns a list of `TimesheetEntry` objects.
@@ -15630,8 +18102,8 @@ Ignores a specific row based on the `model_id` in the url. These records will ha
```typescript -await client.hris.employees.ignoreCreate("model_id", { - reason: "GENERAL_CUSTOMER_REQUEST", +await client.hris.timesheetEntries.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -15648,15 +18120,7 @@ await client.hris.employees.ignoreCreate("model_id", {
-**modelId:** `string` - -
-
- -
-
- -**request:** `Merge.hris.IgnoreCommonModelRequest` +**request:** `Merge.hris.TimesheetEntriesListRequest`
@@ -15664,7 +18128,7 @@ await client.hris.employees.ignoreCreate("model_id", {
-**requestOptions:** `Employees.RequestOptions` +**requestOptions:** `TimesheetEntries.RequestOptions`
@@ -15675,7 +18139,7 @@ await client.hris.employees.ignoreCreate("model_id", {
-
client.hris.employees.metaPostRetrieve() -> Merge.MetaResponse +
client.hris.timesheetEntries.create({ ...params }) -> Merge.TimesheetEntryResponse
@@ -15687,7 +18151,7 @@ await client.hris.employees.ignoreCreate("model_id", {
-Returns metadata for `Employee` POSTs. +Creates a `TimesheetEntry` object with the given values.
@@ -15703,7 +18167,9 @@ Returns metadata for `Employee` POSTs.
```typescript -await client.hris.employees.metaPostRetrieve(); +await client.hris.timesheetEntries.create({ + model: {}, +}); ```
@@ -15719,7 +18185,15 @@ await client.hris.employees.metaPostRetrieve();
-**requestOptions:** `Employees.RequestOptions` +**request:** `Merge.hris.TimesheetEntryEndpointRequest` + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions`
@@ -15730,9 +18204,7 @@ await client.hris.employees.metaPostRetrieve();
-## Hris EmployerBenefits - -
client.hris.employerBenefits.list({ ...params }) -> Merge.PaginatedEmployerBenefitList +
client.hris.timesheetEntries.retrieve(id, { ...params }) -> Merge.TimesheetEntry
@@ -15744,7 +18216,7 @@ await client.hris.employees.metaPostRetrieve();
-Returns a list of `EmployerBenefit` objects. +Returns a `TimesheetEntry` object with the given `id`.
@@ -15760,9 +18232,7 @@ Returns a list of `EmployerBenefit` objects.
```typescript -await client.hris.employerBenefits.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.timesheetEntries.retrieve("id"); ```
@@ -15778,7 +18248,7 @@ await client.hris.employerBenefits.list({
-**request:** `Merge.hris.EmployerBenefitsListRequest` +**id:** `string`
@@ -15786,7 +18256,15 @@ await client.hris.employerBenefits.list({
-**requestOptions:** `EmployerBenefits.RequestOptions` +**request:** `Merge.hris.TimesheetEntriesRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `TimesheetEntries.RequestOptions`
@@ -15797,7 +18275,7 @@ await client.hris.employerBenefits.list({
-
client.hris.employerBenefits.retrieve(id, { ...params }) -> Merge.EmployerBenefit +
client.hris.timesheetEntries.metaPostRetrieve() -> Merge.MetaResponse
@@ -15809,7 +18287,7 @@ await client.hris.employerBenefits.list({
-Returns an `EmployerBenefit` object with the given `id`. +Returns metadata for `TimesheetEntry` POSTs.
@@ -15825,7 +18303,7 @@ Returns an `EmployerBenefit` object with the given `id`.
```typescript -await client.hris.employerBenefits.retrieve("id"); +await client.hris.timesheetEntries.metaPostRetrieve(); ```
@@ -15841,23 +18319,7 @@ await client.hris.employerBenefits.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.EmployerBenefitsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `EmployerBenefits.RequestOptions` +**requestOptions:** `TimesheetEntries.RequestOptions`
@@ -15868,9 +18330,9 @@ await client.hris.employerBenefits.retrieve("id");
-## Hris Employments +## Hris WebhookReceivers -
client.hris.employments.list({ ...params }) -> Merge.PaginatedEmploymentList +
client.hris.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -15882,7 +18344,7 @@ await client.hris.employerBenefits.retrieve("id");
-Returns a list of `Employment` objects. +Returns a list of `WebhookReceiver` objects.
@@ -15898,9 +18360,7 @@ Returns a list of `Employment` objects.
```typescript -await client.hris.employments.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.hris.webhookReceivers.list(); ```
@@ -15916,15 +18376,7 @@ await client.hris.employments.list({
-**request:** `Merge.hris.EmploymentsListRequest` - -
-
- -
-
- -**requestOptions:** `Employments.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -15935,7 +18387,7 @@ await client.hris.employments.list({
-
client.hris.employments.retrieve(id, { ...params }) -> Merge.Employment +
client.hris.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -15947,7 +18399,7 @@ await client.hris.employments.list({
-Returns an `Employment` object with the given `id`. +Creates a `WebhookReceiver` object with the given values.
@@ -15963,7 +18415,10 @@ Returns an `Employment` object with the given `id`.
```typescript -await client.hris.employments.retrieve("id"); +await client.hris.webhookReceivers.create({ + event: "event", + isActive: true, +}); ```
@@ -15979,15 +18434,7 @@ await client.hris.employments.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.EmploymentsRetrieveRequest` +**request:** `Merge.hris.WebhookReceiverRequest`
@@ -15995,7 +18442,7 @@ await client.hris.employments.retrieve("id");
-**requestOptions:** `Employments.RequestOptions` +**requestOptions:** `WebhookReceivers.RequestOptions`
@@ -16006,9 +18453,9 @@ await client.hris.employments.retrieve("id");
-## Hris FieldMapping +## Knowledgebase AccountDetails -
client.hris.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse +
client.knowledgebase.accountDetails.retrieve() -> Merge.AccountDetails
@@ -16020,7 +18467,7 @@ await client.hris.employments.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/). +Get details for a linked account.
@@ -16036,7 +18483,7 @@ Get all Field Mappings for this Linked Account. Field Mappings are mappings betw
```typescript -await client.hris.fieldMapping.fieldMappingsRetrieve(); +await client.knowledgebase.accountDetails.retrieve(); ```
@@ -16052,15 +18499,7 @@ await client.hris.fieldMapping.fieldMappingsRetrieve();
-**request:** `Merge.hris.FieldMappingsRetrieveRequest` - -
-
- -
-
- -**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AccountDetails.RequestOptions`
@@ -16071,7 +18510,9 @@ await client.hris.fieldMapping.fieldMappingsRetrieve();
-
client.hris.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse +## Knowledgebase AccountToken + +
client.knowledgebase.accountToken.retrieve(publicToken) -> Merge.AccountToken
@@ -16083,7 +18524,7 @@ await client.hris.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 the account token for the end user with the provided public token.
@@ -16099,14 +18540,7 @@ Create new Field Mappings that will be available after the next scheduled sync.
```typescript -await client.hris.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.knowledgebase.accountToken.retrieve("public_token"); ```
@@ -16122,7 +18556,7 @@ await client.hris.fieldMapping.fieldMappingsCreate({
-**request:** `Merge.hris.CreateFieldMappingRequest` +**publicToken:** `string`
@@ -16130,7 +18564,7 @@ await client.hris.fieldMapping.fieldMappingsCreate({
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AccountToken.RequestOptions`
@@ -16141,7 +18575,9 @@ await client.hris.fieldMapping.fieldMappingsCreate({
-
client.hris.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse +## Knowledgebase Articles + +
client.knowledgebase.articles.list({ ...params }) -> Merge.PaginatedArticleList
@@ -16153,7 +18589,7 @@ await client.hris.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 `Article` objects.
@@ -16169,7 +18605,9 @@ Deletes Field Mappings for a Linked Account. All data related to this Field Mapp
```typescript -await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id"); +await client.knowledgebase.articles.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16185,7 +18623,7 @@ await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**fieldMappingId:** `string` +**request:** `Merge.knowledgebase.ArticlesListRequest`
@@ -16193,7 +18631,7 @@ await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Articles.RequestOptions`
@@ -16204,7 +18642,7 @@ await client.hris.fieldMapping.fieldMappingsDestroy("field_mapping_id");
-
client.hris.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse +
client.knowledgebase.articles.retrieve(id, { ...params }) -> Merge.Article
@@ -16216,7 +18654,7 @@ await client.hris.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 an `Article` object with the given `id`.
@@ -16232,7 +18670,7 @@ Create or update existing Field Mappings for a Linked Account. Changes will be r
```typescript -await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); +await client.knowledgebase.articles.retrieve("id"); ```
@@ -16248,7 +18686,7 @@ await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**fieldMappingId:** `string` +**id:** `string`
@@ -16256,7 +18694,7 @@ await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**request:** `Merge.hris.PatchedEditFieldMappingRequest` +**request:** `Merge.knowledgebase.ArticlesRetrieveRequest`
@@ -16264,7 +18702,7 @@ await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `Articles.RequestOptions`
@@ -16275,7 +18713,9 @@ await client.hris.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id");
-
client.hris.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse +## Knowledgebase AsyncPassthrough + +
client.knowledgebase.asyncPassthrough.create({ ...params }) -> Merge.AsyncPassthroughReciept
@@ -16287,7 +18727,7 @@ await client.hris.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/). +Asynchronously pull data from an endpoint not currently supported by Merge.
@@ -16303,7 +18743,10 @@ Get all remote fields for a Linked Account. Remote fields are third-party fields
```typescript -await client.hris.fieldMapping.remoteFieldsRetrieve(); +await client.knowledgebase.asyncPassthrough.create({ + method: "GET", + path: "/scooters", +}); ```
@@ -16319,7 +18762,7 @@ await client.hris.fieldMapping.remoteFieldsRetrieve();
-**request:** `Merge.hris.RemoteFieldsRetrieveRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -16327,7 +18770,7 @@ await client.hris.fieldMapping.remoteFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -16338,7 +18781,7 @@ await client.hris.fieldMapping.remoteFieldsRetrieve();
-
client.hris.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse +
client.knowledgebase.asyncPassthrough.retrieve(asyncPassthroughReceiptId) -> Merge.AsyncPassthroughRetrieveResponse
@@ -16350,7 +18793,7 @@ await client.hris.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/). +Retrieves data from earlier async-passthrough POST request
@@ -16366,7 +18809,7 @@ Get all organization-wide Target Fields, this will not include any Linked Accoun
```typescript -await client.hris.fieldMapping.targetFieldsRetrieve(); +await client.knowledgebase.asyncPassthrough.retrieve("async_passthrough_receipt_id"); ```
@@ -16382,7 +18825,15 @@ await client.hris.fieldMapping.targetFieldsRetrieve();
-**requestOptions:** `FieldMapping.RequestOptions` +**asyncPassthroughReceiptId:** `string` + +
+
+ +
+
+ +**requestOptions:** `AsyncPassthrough.RequestOptions`
@@ -16393,9 +18844,9 @@ await client.hris.fieldMapping.targetFieldsRetrieve();
-## Hris GenerateKey +## Knowledgebase Attachments -
client.hris.generateKey.create({ ...params }) -> Merge.RemoteKey +
client.knowledgebase.attachments.list({ ...params }) -> Merge.PaginatedAttachmentList
@@ -16407,7 +18858,7 @@ await client.hris.fieldMapping.targetFieldsRetrieve();
-Create a remote key. +Returns a list of `Attachment` objects.
@@ -16423,8 +18874,8 @@ Create a remote key.
```typescript -await client.hris.generateKey.create({ - name: "Remote Deployment Key 1", +await client.knowledgebase.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -16441,7 +18892,7 @@ await client.hris.generateKey.create({
-**request:** `Merge.hris.GenerateRemoteKeyRequest` +**request:** `Merge.knowledgebase.AttachmentsListRequest`
@@ -16449,7 +18900,7 @@ await client.hris.generateKey.create({
-**requestOptions:** `GenerateKey.RequestOptions` +**requestOptions:** `Attachments.RequestOptions`
@@ -16460,9 +18911,7 @@ await client.hris.generateKey.create({
-## Hris Groups - -
client.hris.groups.list({ ...params }) -> Merge.PaginatedGroupList +
client.knowledgebase.attachments.retrieve(id, { ...params }) -> Merge.Attachment
@@ -16474,7 +18923,7 @@ await client.hris.generateKey.create({
-Returns a list of `Group` objects. +Returns an `Attachment` object with the given `id`.
@@ -16490,9 +18939,7 @@ Returns a list of `Group` objects.
```typescript -await client.hris.groups.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.attachments.retrieve("id"); ```
@@ -16508,7 +18955,7 @@ await client.hris.groups.list({
-**request:** `Merge.hris.GroupsListRequest` +**id:** `string`
@@ -16516,7 +18963,15 @@ await client.hris.groups.list({
-**requestOptions:** `Groups.RequestOptions` +**request:** `Merge.knowledgebase.AttachmentsRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Attachments.RequestOptions`
@@ -16527,7 +18982,9 @@ await client.hris.groups.list({
-
client.hris.groups.retrieve(id, { ...params }) -> Merge.Group +## Knowledgebase AuditTrail + +
client.knowledgebase.auditTrail.list({ ...params }) -> Merge.PaginatedAuditLogEventList
@@ -16539,7 +18996,7 @@ await client.hris.groups.list({
-Returns a `Group` object with the given `id`. +Gets a list of audit trail events.
@@ -16555,7 +19012,9 @@ Returns a `Group` object with the given `id`.
```typescript -await client.hris.groups.retrieve("id"); +await client.knowledgebase.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16571,15 +19030,7 @@ await client.hris.groups.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.GroupsRetrieveRequest` +**request:** `Merge.knowledgebase.AuditTrailListRequest`
@@ -16587,7 +19038,7 @@ await client.hris.groups.retrieve("id");
-**requestOptions:** `Groups.RequestOptions` +**requestOptions:** `AuditTrail.RequestOptions`
@@ -16598,9 +19049,9 @@ await client.hris.groups.retrieve("id");
-## Hris Issues +## Knowledgebase AvailableActions -
client.hris.issues.list({ ...params }) -> Merge.PaginatedIssueList +
client.knowledgebase.availableActions.retrieve() -> Merge.AvailableActions
@@ -16612,7 +19063,7 @@ await client.hris.groups.retrieve("id");
-Gets all issues for Organization. +Returns a list of models and actions available for an account.
@@ -16628,9 +19079,7 @@ Gets all issues for Organization.
```typescript -await client.hris.issues.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.availableActions.retrieve(); ```
@@ -16646,15 +19095,7 @@ await client.hris.issues.list({
-**request:** `Merge.hris.IssuesListRequest` - -
-
- -
-
- -**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `AvailableActions.RequestOptions`
@@ -16665,7 +19106,9 @@ await client.hris.issues.list({
-
client.hris.issues.retrieve(id) -> Merge.Issue +## Knowledgebase Containers + +
client.knowledgebase.containers.list({ ...params }) -> Merge.PaginatedContainerList
@@ -16677,7 +19120,7 @@ await client.hris.issues.list({
-Get a specific issue. +Returns a list of `Container` objects.
@@ -16693,7 +19136,9 @@ Get a specific issue.
```typescript -await client.hris.issues.retrieve("id"); +await client.knowledgebase.containers.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -16709,7 +19154,7 @@ await client.hris.issues.retrieve("id");
-**id:** `string` +**request:** `Merge.knowledgebase.ContainersListRequest`
@@ -16717,7 +19162,7 @@ await client.hris.issues.retrieve("id");
-**requestOptions:** `Issues.RequestOptions` +**requestOptions:** `Containers.RequestOptions`
@@ -16728,9 +19173,7 @@ await client.hris.issues.retrieve("id");
-## Hris LinkToken - -
client.hris.linkToken.create({ ...params }) -> Merge.LinkToken +
client.knowledgebase.containers.retrieve(id, { ...params }) -> Merge.Container
@@ -16742,7 +19185,7 @@ await client.hris.issues.retrieve("id");
-Creates a link token to be used when linking a new end user. +Returns a `Container` object with the given `id`.
@@ -16758,12 +19201,7 @@ Creates a link token to be used when linking a new end user.
```typescript -await client.hris.linkToken.create({ - endUserEmailAddress: "example@gmail.com", - endUserOrganizationName: "Test Organization", - endUserOriginId: "12345", - categories: ["hris", "ats"], -}); +await client.knowledgebase.containers.retrieve("id"); ```
@@ -16779,7 +19217,7 @@ await client.hris.linkToken.create({
-**request:** `Merge.hris.EndUserDetailsRequest` +**id:** `string`
@@ -16787,7 +19225,15 @@ await client.hris.linkToken.create({
-**requestOptions:** `LinkToken.RequestOptions` +**request:** `Merge.knowledgebase.ContainersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Containers.RequestOptions`
@@ -16798,9 +19244,9 @@ await client.hris.linkToken.create({
-## Hris LinkedAccounts +## Knowledgebase Scopes -
client.hris.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList +
client.knowledgebase.scopes.defaultScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -16812,7 +19258,7 @@ await client.hris.linkToken.create({
-List linked accounts for your organization. +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).
@@ -16828,9 +19274,7 @@ List linked accounts for your organization.
```typescript -await client.hris.linkedAccounts.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.scopes.defaultScopesRetrieve(); ```
@@ -16846,15 +19290,7 @@ await client.hris.linkedAccounts.list({
-**request:** `Merge.hris.LinkedAccountsListRequest` - -
-
- -
-
- -**requestOptions:** `LinkedAccounts.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -16865,9 +19301,7 @@ await client.hris.linkedAccounts.list({
-## Hris Locations - -
client.hris.locations.list({ ...params }) -> Merge.PaginatedLocationList +
client.knowledgebase.scopes.linkedAccountScopesRetrieve() -> Merge.CommonModelScopeApi
@@ -16879,7 +19313,7 @@ await client.hris.linkedAccounts.list({
-Returns a list of `Location` 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).
@@ -16895,9 +19329,7 @@ Returns a list of `Location` objects.
```typescript -await client.hris.locations.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.scopes.linkedAccountScopesRetrieve(); ```
@@ -16913,15 +19345,7 @@ await client.hris.locations.list({
-**request:** `Merge.hris.LocationsListRequest` - -
-
- -
-
- -**requestOptions:** `Locations.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -16932,7 +19356,7 @@ await client.hris.locations.list({
-
client.hris.locations.retrieve(id, { ...params }) -> Merge.Location +
client.knowledgebase.scopes.linkedAccountScopesCreate({ ...params }) -> Merge.CommonModelScopeApi
@@ -16944,7 +19368,7 @@ await client.hris.locations.list({
-Returns a `Location` 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)
@@ -16960,7 +19384,33 @@ Returns a `Location` object with the given `id`.
```typescript -await client.hris.locations.retrieve("id"); +await client.knowledgebase.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, + }, + }, + }, + ], +}); ```
@@ -16976,15 +19426,7 @@ await client.hris.locations.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.LocationsRetrieveRequest` +**request:** `Merge.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest`
@@ -16992,7 +19434,7 @@ await client.hris.locations.retrieve("id");
-**requestOptions:** `Locations.RequestOptions` +**requestOptions:** `Scopes.RequestOptions`
@@ -17003,9 +19445,9 @@ await client.hris.locations.retrieve("id");
-## Hris Passthrough +## Knowledgebase DeleteAccount -
client.hris.passthrough.create({ ...params }) -> Merge.RemoteResponse +
client.knowledgebase.deleteAccount.delete() -> void
@@ -17017,7 +19459,7 @@ await client.hris.locations.retrieve("id");
-Pull data from an endpoint not currently supported by Merge. +Delete a linked account.
@@ -17033,10 +19475,7 @@ Pull data from an endpoint not currently supported by Merge.
```typescript -await client.hris.passthrough.create({ - method: "GET", - path: "/scooters", -}); +await client.knowledgebase.deleteAccount.delete(); ```
@@ -17052,15 +19491,7 @@ await client.hris.passthrough.create({
-**request:** `Merge.DataPassthroughRequest` - -
-
- -
-
- -**requestOptions:** `Passthrough.RequestOptions` +**requestOptions:** `DeleteAccount.RequestOptions`
@@ -17071,9 +19502,9 @@ await client.hris.passthrough.create({
-## Hris PayGroups +## Knowledgebase FieldMapping -
client.hris.payGroups.list({ ...params }) -> Merge.PaginatedPayGroupList +
client.knowledgebase.fieldMapping.fieldMappingsRetrieve({ ...params }) -> Merge.FieldMappingApiInstanceResponse
@@ -17085,7 +19516,7 @@ await client.hris.passthrough.create({
-Returns a list of `PayGroup` objects. +Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -17101,9 +19532,7 @@ Returns a list of `PayGroup` objects.
```typescript -await client.hris.payGroups.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.fieldMapping.fieldMappingsRetrieve(); ```
@@ -17119,7 +19548,7 @@ await client.hris.payGroups.list({
-**request:** `Merge.hris.PayGroupsListRequest` +**request:** `Merge.knowledgebase.FieldMappingsRetrieveRequest`
@@ -17127,7 +19556,7 @@ await client.hris.payGroups.list({
-**requestOptions:** `PayGroups.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17138,7 +19567,7 @@ await client.hris.payGroups.list({
-
client.hris.payGroups.retrieve(id, { ...params }) -> Merge.PayGroup +
client.knowledgebase.fieldMapping.fieldMappingsCreate({ ...params }) -> Merge.FieldMappingInstanceResponse
@@ -17150,7 +19579,7 @@ await client.hris.payGroups.list({
-Returns a `PayGroup` object with the given `id`. +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.
@@ -17166,7 +19595,14 @@ Returns a `PayGroup` object with the given `id`.
```typescript -await client.hris.payGroups.retrieve("id"); +await client.knowledgebase.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", +}); ```
@@ -17182,15 +19618,7 @@ await client.hris.payGroups.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.PayGroupsRetrieveRequest` +**request:** `Merge.knowledgebase.CreateFieldMappingRequest`
@@ -17198,7 +19626,7 @@ await client.hris.payGroups.retrieve("id");
-**requestOptions:** `PayGroups.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17209,9 +19637,7 @@ await client.hris.payGroups.retrieve("id");
-## Hris PayrollRuns - -
client.hris.payrollRuns.list({ ...params }) -> Merge.PaginatedPayrollRunList +
client.knowledgebase.fieldMapping.fieldMappingsDestroy(fieldMappingId) -> Merge.FieldMappingInstanceResponse
@@ -17223,7 +19649,7 @@ await client.hris.payGroups.retrieve("id");
-Returns a list of `PayrollRun` 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.
@@ -17239,9 +19665,7 @@ Returns a list of `PayrollRun` objects.
```typescript -await client.hris.payrollRuns.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.fieldMapping.fieldMappingsDestroy("field_mapping_id"); ```
@@ -17257,7 +19681,7 @@ await client.hris.payrollRuns.list({
-**request:** `Merge.hris.PayrollRunsListRequest` +**fieldMappingId:** `string`
@@ -17265,7 +19689,7 @@ await client.hris.payrollRuns.list({
-**requestOptions:** `PayrollRuns.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17276,7 +19700,7 @@ await client.hris.payrollRuns.list({
-
client.hris.payrollRuns.retrieve(id, { ...params }) -> Merge.PayrollRun +
client.knowledgebase.fieldMapping.fieldMappingsPartialUpdate(fieldMappingId, { ...params }) -> Merge.FieldMappingInstanceResponse
@@ -17288,7 +19712,7 @@ await client.hris.payrollRuns.list({
-Returns a `PayrollRun` object with the given `id`. +Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
@@ -17304,7 +19728,7 @@ Returns a `PayrollRun` object with the given `id`.
```typescript -await client.hris.payrollRuns.retrieve("id"); +await client.knowledgebase.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); ```
@@ -17320,7 +19744,7 @@ await client.hris.payrollRuns.retrieve("id");
-**id:** `string` +**fieldMappingId:** `string`
@@ -17328,7 +19752,7 @@ await client.hris.payrollRuns.retrieve("id");
-**request:** `Merge.hris.PayrollRunsRetrieveRequest` +**request:** `Merge.knowledgebase.PatchedEditFieldMappingRequest`
@@ -17336,7 +19760,7 @@ await client.hris.payrollRuns.retrieve("id");
-**requestOptions:** `PayrollRuns.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17347,9 +19771,7 @@ await client.hris.payrollRuns.retrieve("id");
-## Hris RegenerateKey - -
client.hris.regenerateKey.create({ ...params }) -> Merge.RemoteKey +
client.knowledgebase.fieldMapping.remoteFieldsRetrieve({ ...params }) -> Merge.RemoteFieldApiResponse
@@ -17361,7 +19783,7 @@ await client.hris.payrollRuns.retrieve("id");
-Exchange remote keys. +Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
@@ -17377,9 +19799,7 @@ Exchange remote keys.
```typescript -await client.hris.regenerateKey.create({ - name: "Remote Deployment Key 1", -}); +await client.knowledgebase.fieldMapping.remoteFieldsRetrieve(); ```
@@ -17395,7 +19815,7 @@ await client.hris.regenerateKey.create({
-**request:** `Merge.hris.RemoteKeyForRegenerationRequest` +**request:** `Merge.knowledgebase.RemoteFieldsRetrieveRequest`
@@ -17403,7 +19823,7 @@ await client.hris.regenerateKey.create({
-**requestOptions:** `RegenerateKey.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17414,9 +19834,7 @@ await client.hris.regenerateKey.create({
-## Hris SyncStatus - -
client.hris.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList +
client.knowledgebase.fieldMapping.targetFieldsRetrieve() -> Merge.ExternalTargetFieldApiResponse
@@ -17428,7 +19846,7 @@ await client.hris.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). +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/).
@@ -17444,9 +19862,7 @@ Get sync status for the current sync and the most recently finished sync. `last_
```typescript -await client.hris.syncStatus.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", -}); +await client.knowledgebase.fieldMapping.targetFieldsRetrieve(); ```
@@ -17462,15 +19878,7 @@ await client.hris.syncStatus.list({
-**request:** `Merge.hris.SyncStatusListRequest` - -
-
- -
-
- -**requestOptions:** `SyncStatus.RequestOptions` +**requestOptions:** `FieldMapping.RequestOptions`
@@ -17481,9 +19889,9 @@ await client.hris.syncStatus.list({
-## Hris ForceResync +## Knowledgebase GenerateKey -
client.hris.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[] +
client.knowledgebase.generateKey.create({ ...params }) -> Merge.RemoteKey
@@ -17495,7 +19903,7 @@ await client.hris.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. +Create a remote key.
@@ -17511,7 +19919,9 @@ Force re-sync of all models. This endpoint is available for monthly, quarterly,
```typescript -await client.hris.forceResync.syncStatusResyncCreate(); +await client.knowledgebase.generateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -17527,7 +19937,15 @@ await client.hris.forceResync.syncStatusResyncCreate();
-**requestOptions:** `ForceResync.RequestOptions` +**request:** `Merge.knowledgebase.GenerateRemoteKeyRequest` + +
+
+ +
+
+ +**requestOptions:** `GenerateKey.RequestOptions`
@@ -17538,9 +19956,9 @@ await client.hris.forceResync.syncStatusResyncCreate();
-## Hris Teams +## Knowledgebase Groups -
client.hris.teams.list({ ...params }) -> Merge.PaginatedTeamList +
client.knowledgebase.groups.list({ ...params }) -> Merge.PaginatedGroupList
@@ -17552,7 +19970,7 @@ await client.hris.forceResync.syncStatusResyncCreate();
-Returns a list of `Team` objects. +Returns a list of `Group` objects.
@@ -17568,7 +19986,7 @@ Returns a list of `Team` objects.
```typescript -await client.hris.teams.list({ +await client.knowledgebase.groups.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -17586,7 +20004,7 @@ await client.hris.teams.list({
-**request:** `Merge.hris.TeamsListRequest` +**request:** `Merge.knowledgebase.GroupsListRequest`
@@ -17594,7 +20012,7 @@ await client.hris.teams.list({
-**requestOptions:** `Teams.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -17605,7 +20023,7 @@ await client.hris.teams.list({
-
client.hris.teams.retrieve(id, { ...params }) -> Merge.Team +
client.knowledgebase.groups.retrieve(id, { ...params }) -> Merge.Group
@@ -17617,7 +20035,7 @@ await client.hris.teams.list({
-Returns a `Team` object with the given `id`. +Returns a `Group` object with the given `id`.
@@ -17633,7 +20051,7 @@ Returns a `Team` object with the given `id`.
```typescript -await client.hris.teams.retrieve("id"); +await client.knowledgebase.groups.retrieve("id"); ```
@@ -17657,7 +20075,7 @@ await client.hris.teams.retrieve("id");
-**request:** `Merge.hris.TeamsRetrieveRequest` +**request:** `Merge.knowledgebase.GroupsRetrieveRequest`
@@ -17665,7 +20083,7 @@ await client.hris.teams.retrieve("id");
-**requestOptions:** `Teams.RequestOptions` +**requestOptions:** `Groups.RequestOptions`
@@ -17676,9 +20094,9 @@ await client.hris.teams.retrieve("id");
-## Hris TimeOff +## Knowledgebase Issues -
client.hris.timeOff.list({ ...params }) -> Merge.PaginatedTimeOffList +
client.knowledgebase.issues.list({ ...params }) -> Merge.PaginatedIssueList
@@ -17690,7 +20108,7 @@ await client.hris.teams.retrieve("id");
-Returns a list of `TimeOff` objects. +Gets all issues for Organization.
@@ -17706,7 +20124,7 @@ Returns a list of `TimeOff` objects.
```typescript -await client.hris.timeOff.list({ +await client.knowledgebase.issues.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -17724,7 +20142,7 @@ await client.hris.timeOff.list({
-**request:** `Merge.hris.TimeOffListRequest` +**request:** `Merge.knowledgebase.IssuesListRequest`
@@ -17732,7 +20150,7 @@ await client.hris.timeOff.list({
-**requestOptions:** `TimeOff.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -17743,7 +20161,7 @@ await client.hris.timeOff.list({
-
client.hris.timeOff.create({ ...params }) -> Merge.TimeOffResponse +
client.knowledgebase.issues.retrieve(id) -> Merge.Issue
@@ -17755,7 +20173,7 @@ await client.hris.timeOff.list({
-Creates a `TimeOff` object with the given values. +Get a specific issue.
@@ -17771,9 +20189,7 @@ Creates a `TimeOff` object with the given values.
```typescript -await client.hris.timeOff.create({ - model: {}, -}); +await client.knowledgebase.issues.retrieve("id"); ```
@@ -17789,7 +20205,7 @@ await client.hris.timeOff.create({
-**request:** `Merge.hris.TimeOffEndpointRequest` +**id:** `string`
@@ -17797,7 +20213,7 @@ await client.hris.timeOff.create({
-**requestOptions:** `TimeOff.RequestOptions` +**requestOptions:** `Issues.RequestOptions`
@@ -17808,7 +20224,9 @@ await client.hris.timeOff.create({
-
client.hris.timeOff.retrieve(id, { ...params }) -> Merge.TimeOff +## Knowledgebase LinkToken + +
client.knowledgebase.linkToken.create({ ...params }) -> Merge.LinkToken
@@ -17820,7 +20238,7 @@ await client.hris.timeOff.create({
-Returns a `TimeOff` object with the given `id`. +Creates a link token to be used when linking a new end user.
@@ -17836,7 +20254,12 @@ Returns a `TimeOff` object with the given `id`.
```typescript -await client.hris.timeOff.retrieve("id"); +await client.knowledgebase.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], +}); ```
@@ -17852,15 +20275,7 @@ await client.hris.timeOff.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.TimeOffRetrieveRequest` +**request:** `Merge.knowledgebase.EndUserDetailsRequest`
@@ -17868,7 +20283,7 @@ await client.hris.timeOff.retrieve("id");
-**requestOptions:** `TimeOff.RequestOptions` +**requestOptions:** `LinkToken.RequestOptions`
@@ -17879,7 +20294,9 @@ await client.hris.timeOff.retrieve("id");
-
client.hris.timeOff.metaPostRetrieve() -> Merge.MetaResponse +## Knowledgebase LinkedAccounts + +
client.knowledgebase.linkedAccounts.list({ ...params }) -> Merge.PaginatedAccountDetailsAndActionsList
@@ -17891,7 +20308,7 @@ await client.hris.timeOff.retrieve("id");
-Returns metadata for `TimeOff` POSTs. +List linked accounts for your organization.
@@ -17907,7 +20324,9 @@ Returns metadata for `TimeOff` POSTs.
```typescript -await client.hris.timeOff.metaPostRetrieve(); +await client.knowledgebase.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -17923,7 +20342,15 @@ await client.hris.timeOff.metaPostRetrieve();
-**requestOptions:** `TimeOff.RequestOptions` +**request:** `Merge.knowledgebase.LinkedAccountsListRequest` + +
+
+ +
+
+ +**requestOptions:** `LinkedAccounts.RequestOptions`
@@ -17934,9 +20361,9 @@ await client.hris.timeOff.metaPostRetrieve();
-## Hris TimeOffBalances +## Knowledgebase Passthrough -
client.hris.timeOffBalances.list({ ...params }) -> Merge.PaginatedTimeOffBalanceList +
client.knowledgebase.passthrough.create({ ...params }) -> Merge.RemoteResponse
@@ -17948,7 +20375,7 @@ await client.hris.timeOff.metaPostRetrieve();
-Returns a list of `TimeOffBalance` objects. +Pull data from an endpoint not currently supported by Merge.
@@ -17964,8 +20391,9 @@ Returns a list of `TimeOffBalance` objects.
```typescript -await client.hris.timeOffBalances.list({ - cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +await client.knowledgebase.passthrough.create({ + method: "GET", + path: "/scooters", }); ``` @@ -17982,7 +20410,7 @@ await client.hris.timeOffBalances.list({
-**request:** `Merge.hris.TimeOffBalancesListRequest` +**request:** `Merge.DataPassthroughRequest`
@@ -17990,7 +20418,7 @@ await client.hris.timeOffBalances.list({
-**requestOptions:** `TimeOffBalances.RequestOptions` +**requestOptions:** `Passthrough.RequestOptions`
@@ -18001,7 +20429,9 @@ await client.hris.timeOffBalances.list({
-
client.hris.timeOffBalances.retrieve(id, { ...params }) -> Merge.TimeOffBalance +## Knowledgebase RegenerateKey + +
client.knowledgebase.regenerateKey.create({ ...params }) -> Merge.RemoteKey
@@ -18013,7 +20443,7 @@ await client.hris.timeOffBalances.list({
-Returns a `TimeOffBalance` object with the given `id`. +Exchange remote keys.
@@ -18029,7 +20459,9 @@ Returns a `TimeOffBalance` object with the given `id`.
```typescript -await client.hris.timeOffBalances.retrieve("id"); +await client.knowledgebase.regenerateKey.create({ + name: "Remote Deployment Key 1", +}); ```
@@ -18045,15 +20477,7 @@ await client.hris.timeOffBalances.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.TimeOffBalancesRetrieveRequest` +**request:** `Merge.knowledgebase.RemoteKeyForRegenerationRequest`
@@ -18061,7 +20485,7 @@ await client.hris.timeOffBalances.retrieve("id");
-**requestOptions:** `TimeOffBalances.RequestOptions` +**requestOptions:** `RegenerateKey.RequestOptions`
@@ -18072,9 +20496,9 @@ await client.hris.timeOffBalances.retrieve("id");
-## Hris TimesheetEntries +## Knowledgebase SyncStatus -
client.hris.timesheetEntries.list({ ...params }) -> Merge.PaginatedTimesheetEntryList +
client.knowledgebase.syncStatus.list({ ...params }) -> Merge.PaginatedSyncStatusList
@@ -18086,7 +20510,7 @@ await client.hris.timeOffBalances.retrieve("id");
-Returns a list of `TimesheetEntry` objects. +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).
@@ -18102,7 +20526,7 @@ Returns a list of `TimesheetEntry` objects.
```typescript -await client.hris.timesheetEntries.list({ +await client.knowledgebase.syncStatus.list({ cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", }); ``` @@ -18120,7 +20544,7 @@ await client.hris.timesheetEntries.list({
-**request:** `Merge.hris.TimesheetEntriesListRequest` +**request:** `Merge.knowledgebase.SyncStatusListRequest`
@@ -18128,7 +20552,7 @@ await client.hris.timesheetEntries.list({
-**requestOptions:** `TimesheetEntries.RequestOptions` +**requestOptions:** `SyncStatus.RequestOptions`
@@ -18139,7 +20563,9 @@ await client.hris.timesheetEntries.list({
-
client.hris.timesheetEntries.create({ ...params }) -> Merge.TimesheetEntryResponse +## Knowledgebase ForceResync + +
client.knowledgebase.forceResync.syncStatusResyncCreate() -> Merge.SyncStatus[]
@@ -18151,7 +20577,7 @@ await client.hris.timesheetEntries.list({
-Creates a `TimesheetEntry` object with the given values. +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.
@@ -18167,9 +20593,7 @@ Creates a `TimesheetEntry` object with the given values.
```typescript -await client.hris.timesheetEntries.create({ - model: {}, -}); +await client.knowledgebase.forceResync.syncStatusResyncCreate(); ```
@@ -18185,15 +20609,7 @@ await client.hris.timesheetEntries.create({
-**request:** `Merge.hris.TimesheetEntryEndpointRequest` - -
-
- -
-
- -**requestOptions:** `TimesheetEntries.RequestOptions` +**requestOptions:** `ForceResync.RequestOptions`
@@ -18204,7 +20620,9 @@ await client.hris.timesheetEntries.create({
-
client.hris.timesheetEntries.retrieve(id, { ...params }) -> Merge.TimesheetEntry +## Knowledgebase Users + +
client.knowledgebase.users.list({ ...params }) -> Merge.PaginatedUserList
@@ -18216,7 +20634,7 @@ await client.hris.timesheetEntries.create({
-Returns a `TimesheetEntry` object with the given `id`. +Returns a list of `User` objects.
@@ -18232,7 +20650,9 @@ Returns a `TimesheetEntry` object with the given `id`.
```typescript -await client.hris.timesheetEntries.retrieve("id"); +await client.knowledgebase.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", +}); ```
@@ -18248,15 +20668,7 @@ await client.hris.timesheetEntries.retrieve("id");
-**id:** `string` - -
-
- -
-
- -**request:** `Merge.hris.TimesheetEntriesRetrieveRequest` +**request:** `Merge.knowledgebase.UsersListRequest`
@@ -18264,7 +20676,7 @@ await client.hris.timesheetEntries.retrieve("id");
-**requestOptions:** `TimesheetEntries.RequestOptions` +**requestOptions:** `Users.RequestOptions`
@@ -18275,7 +20687,7 @@ await client.hris.timesheetEntries.retrieve("id");
-
client.hris.timesheetEntries.metaPostRetrieve() -> Merge.MetaResponse +
client.knowledgebase.users.retrieve(id, { ...params }) -> Merge.User
@@ -18287,7 +20699,7 @@ await client.hris.timesheetEntries.retrieve("id");
-Returns metadata for `TimesheetEntry` POSTs. +Returns a `User` object with the given `id`.
@@ -18303,7 +20715,7 @@ Returns metadata for `TimesheetEntry` POSTs.
```typescript -await client.hris.timesheetEntries.metaPostRetrieve(); +await client.knowledgebase.users.retrieve("id"); ```
@@ -18319,7 +20731,23 @@ await client.hris.timesheetEntries.metaPostRetrieve();
-**requestOptions:** `TimesheetEntries.RequestOptions` +**id:** `string` + +
+
+ +
+
+ +**request:** `Merge.knowledgebase.UsersRetrieveRequest` + +
+
+ +
+
+ +**requestOptions:** `Users.RequestOptions`
@@ -18330,9 +20758,9 @@ await client.hris.timesheetEntries.metaPostRetrieve();
-## Hris WebhookReceivers +## Knowledgebase WebhookReceivers -
client.hris.webhookReceivers.list() -> Merge.WebhookReceiver[] +
client.knowledgebase.webhookReceivers.list() -> Merge.WebhookReceiver[]
@@ -18360,7 +20788,7 @@ Returns a list of `WebhookReceiver` objects.
```typescript -await client.hris.webhookReceivers.list(); +await client.knowledgebase.webhookReceivers.list(); ```
@@ -18387,7 +20815,7 @@ await client.hris.webhookReceivers.list();
-
client.hris.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver +
client.knowledgebase.webhookReceivers.create({ ...params }) -> Merge.WebhookReceiver
@@ -18415,7 +20843,7 @@ Creates a `WebhookReceiver` object with the given values.
```typescript -await client.hris.webhookReceivers.create({ +await client.knowledgebase.webhookReceivers.create({ event: "event", isActive: true, }); @@ -18434,7 +20862,7 @@ await client.hris.webhookReceivers.create({
-**request:** `Merge.hris.WebhookReceiverRequest` +**request:** `Merge.knowledgebase.WebhookReceiverRequest`
diff --git a/src/Client.ts b/src/Client.ts index bff806794..012eade63 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -6,9 +6,10 @@ import * as environments from "./environments"; import * as core from "./core"; import { mergeHeaders } from "./core/headers"; import { Ats } from "./api/resources/ats/client/Client"; -import { Filestorage } from "./api/resources/filestorage/client/Client"; import { Crm } from "./api/resources/crm/client/Client"; +import { Filestorage } from "./api/resources/filestorage/client/Client"; import { Hris } from "./api/resources/hris/client/Client"; +import { Knowledgebase } from "./api/resources/knowledgebase/client/Client"; import { Ticketing } from "./api/resources/ticketing/client/Client"; import { Accounting } from "./api/resources/accounting/client/Client"; @@ -44,9 +45,10 @@ export declare namespace MergeClient { export class MergeClient { protected readonly _options: MergeClient.Options; protected _ats: Ats | undefined; - protected _filestorage: Filestorage | undefined; protected _crm: Crm | undefined; + protected _filestorage: Filestorage | undefined; protected _hris: Hris | undefined; + protected _knowledgebase: Knowledgebase | undefined; protected _ticketing: Ticketing | undefined; protected _accounting: Accounting | undefined; @@ -58,8 +60,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.2.0", - "User-Agent": "@mergeapi/merge-node-client/2.2.0", + "X-Fern-SDK-Version": "2.3.0", + "User-Agent": "@mergeapi/merge-node-client/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -72,18 +74,22 @@ export class MergeClient { return (this._ats ??= new Ats(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 filestorage(): Filestorage { + return (this._filestorage ??= new Filestorage(this._options)); + } + public get hris(): Hris { return (this._hris ??= new Hris(this._options)); } + public get knowledgebase(): Knowledgebase { + return (this._knowledgebase ??= new Knowledgebase(this._options)); + } + public get ticketing(): Ticketing { return (this._ticketing ??= new Ticketing(this._options)); } diff --git a/src/api/resources/hris/resources/dependents/client/Client.ts b/src/api/resources/hris/resources/dependents/client/Client.ts index a756fccf5..64bdbe456 100644 --- a/src/api/resources/hris/resources/dependents/client/Client.ts +++ b/src/api/resources/hris/resources/dependents/client/Client.ts @@ -71,6 +71,7 @@ export class Dependents { createdAfter, createdBefore, cursor, + employeeId, includeDeletedData, includeRemoteData, includeSensitiveFields, @@ -93,6 +94,10 @@ export class Dependents { _queryParams["cursor"] = cursor; } + if (employeeId != null) { + _queryParams["employee_id"] = employeeId; + } + if (includeDeletedData != null) { _queryParams["include_deleted_data"] = includeDeletedData.toString(); } diff --git a/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts b/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts index 2de9c81b5..3391bd737 100644 --- a/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts +++ b/src/api/resources/hris/resources/dependents/client/requests/DependentsListRequest.ts @@ -15,6 +15,8 @@ export interface DependentsListRequest { createdBefore?: Date; /** The pagination cursor value. */ cursor?: string; + /** If provided, will only return dependents for this employee. */ + employeeId?: 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; /** Whether to include the original data Merge fetched from the third-party to produce these models. */ diff --git a/src/api/resources/hris/resources/employees/client/Client.ts b/src/api/resources/hris/resources/employees/client/Client.ts index 72cab8c9f..8880f9507 100644 --- a/src/api/resources/hris/resources/employees/client/Client.ts +++ b/src/api/resources/hris/resources/employees/client/Client.ts @@ -73,6 +73,7 @@ export class Employees { createdBefore, cursor, displayFullName, + employeeNumber, employmentStatus, employmentType, expand, @@ -123,6 +124,10 @@ export class Employees { _queryParams["display_full_name"] = displayFullName; } + if (employeeNumber != null) { + _queryParams["employee_number"] = employeeNumber; + } + if (employmentStatus != null) { _queryParams["employment_status"] = serializers.hris.EmployeesListRequestEmploymentStatus.jsonOrThrow( employmentStatus, diff --git a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts index 542ec85e8..cf7bb0b1e 100644 --- a/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts +++ b/src/api/resources/hris/resources/employees/client/requests/EmployeesListRequest.ts @@ -21,6 +21,8 @@ export interface EmployeesListRequest { cursor?: string; /** If provided, will only return employees with this display name. */ displayFullName?: string; + /** If provided, will only return employees with this employee number. */ + employeeNumber?: string; /** * If provided, will only return employees with this employment status. * diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 7df440533..10989063c 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,6 +1,7 @@ export * as ats from "./ats"; -export * as filestorage from "./filestorage"; export * as crm from "./crm"; +export * as filestorage from "./filestorage"; export * as hris from "./hris"; +export * as knowledgebase from "./knowledgebase"; export * as ticketing from "./ticketing"; export * as accounting from "./accounting"; diff --git a/src/api/resources/knowledgebase/client/Client.ts b/src/api/resources/knowledgebase/client/Client.ts new file mode 100644 index 000000000..c0e97dcdf --- /dev/null +++ b/src/api/resources/knowledgebase/client/Client.ts @@ -0,0 +1,160 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import { AccountDetails } from "../resources/accountDetails/client/Client"; +import { AccountToken } from "../resources/accountToken/client/Client"; +import { Articles } from "../resources/articles/client/Client"; +import { AsyncPassthrough } from "../resources/asyncPassthrough/client/Client"; +import { Attachments } from "../resources/attachments/client/Client"; +import { AuditTrail } from "../resources/auditTrail/client/Client"; +import { AvailableActions } from "../resources/availableActions/client/Client"; +import { Containers } from "../resources/containers/client/Client"; +import { Scopes } from "../resources/scopes/client/Client"; +import { DeleteAccount } from "../resources/deleteAccount/client/Client"; +import { FieldMapping } from "../resources/fieldMapping/client/Client"; +import { GenerateKey } from "../resources/generateKey/client/Client"; +import { Groups } from "../resources/groups/client/Client"; +import { Issues } from "../resources/issues/client/Client"; +import { LinkToken } from "../resources/linkToken/client/Client"; +import { LinkedAccounts } from "../resources/linkedAccounts/client/Client"; +import { Passthrough } from "../resources/passthrough/client/Client"; +import { RegenerateKey } from "../resources/regenerateKey/client/Client"; +import { SyncStatus } from "../resources/syncStatus/client/Client"; +import { ForceResync } from "../resources/forceResync/client/Client"; +import { Users } from "../resources/users/client/Client"; +import { WebhookReceivers } from "../resources/webhookReceivers/client/Client"; + +export declare namespace Knowledgebase { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } +} + +export class Knowledgebase { + protected readonly _options: Knowledgebase.Options; + protected _accountDetails: AccountDetails | undefined; + protected _accountToken: AccountToken | undefined; + protected _articles: Articles | undefined; + protected _asyncPassthrough: AsyncPassthrough | undefined; + protected _attachments: Attachments | undefined; + protected _auditTrail: AuditTrail | undefined; + protected _availableActions: AvailableActions | undefined; + protected _containers: Containers | undefined; + protected _scopes: Scopes | undefined; + protected _deleteAccount: DeleteAccount | undefined; + protected _fieldMapping: FieldMapping | undefined; + protected _generateKey: GenerateKey | undefined; + protected _groups: Groups | undefined; + protected _issues: Issues | undefined; + protected _linkToken: LinkToken | undefined; + protected _linkedAccounts: LinkedAccounts | undefined; + protected _passthrough: Passthrough | undefined; + protected _regenerateKey: RegenerateKey | undefined; + protected _syncStatus: SyncStatus | undefined; + protected _forceResync: ForceResync | undefined; + protected _users: Users | undefined; + protected _webhookReceivers: WebhookReceivers | undefined; + + constructor(_options: Knowledgebase.Options) { + this._options = _options; + } + + public get accountDetails(): AccountDetails { + return (this._accountDetails ??= new AccountDetails(this._options)); + } + + public get accountToken(): AccountToken { + return (this._accountToken ??= new AccountToken(this._options)); + } + + public get articles(): Articles { + return (this._articles ??= new Articles(this._options)); + } + + public get asyncPassthrough(): AsyncPassthrough { + return (this._asyncPassthrough ??= new AsyncPassthrough(this._options)); + } + + public get attachments(): Attachments { + return (this._attachments ??= new Attachments(this._options)); + } + + public get auditTrail(): AuditTrail { + return (this._auditTrail ??= new AuditTrail(this._options)); + } + + public get availableActions(): AvailableActions { + return (this._availableActions ??= new AvailableActions(this._options)); + } + + public get containers(): Containers { + return (this._containers ??= new Containers(this._options)); + } + + public get scopes(): Scopes { + return (this._scopes ??= new Scopes(this._options)); + } + + public get deleteAccount(): DeleteAccount { + return (this._deleteAccount ??= new DeleteAccount(this._options)); + } + + public get fieldMapping(): FieldMapping { + return (this._fieldMapping ??= new FieldMapping(this._options)); + } + + public get generateKey(): GenerateKey { + return (this._generateKey ??= new GenerateKey(this._options)); + } + + public get groups(): Groups { + return (this._groups ??= new Groups(this._options)); + } + + public get issues(): Issues { + return (this._issues ??= new Issues(this._options)); + } + + public get linkToken(): LinkToken { + return (this._linkToken ??= new LinkToken(this._options)); + } + + public get linkedAccounts(): LinkedAccounts { + return (this._linkedAccounts ??= new LinkedAccounts(this._options)); + } + + public get passthrough(): Passthrough { + return (this._passthrough ??= new Passthrough(this._options)); + } + + public get regenerateKey(): RegenerateKey { + return (this._regenerateKey ??= new RegenerateKey(this._options)); + } + + public get syncStatus(): SyncStatus { + return (this._syncStatus ??= new SyncStatus(this._options)); + } + + public get forceResync(): ForceResync { + return (this._forceResync ??= new ForceResync(this._options)); + } + + public get users(): Users { + return (this._users ??= new Users(this._options)); + } + + public get webhookReceivers(): WebhookReceivers { + return (this._webhookReceivers ??= new WebhookReceivers(this._options)); + } +} diff --git a/src/api/resources/knowledgebase/client/index.ts b/src/api/resources/knowledgebase/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/index.ts b/src/api/resources/knowledgebase/index.ts new file mode 100644 index 000000000..d3c50802a --- /dev/null +++ b/src/api/resources/knowledgebase/index.ts @@ -0,0 +1,3 @@ +export * from "./resources"; +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/accountDetails/client/Client.ts b/src/api/resources/knowledgebase/resources/accountDetails/client/Client.ts new file mode 100644 index 000000000..3a069c959 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountDetails/client/Client.ts @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AccountDetails { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class AccountDetails { + protected readonly _options: AccountDetails.Options; + + constructor(_options: AccountDetails.Options) { + this._options = _options; + } + + /** + * Get details for a linked account. + * + * @param {AccountDetails.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.accountDetails.retrieve() + */ + public retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AccountDetails.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/account-details", + ), + 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.knowledgebase.AccountDetails.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 /knowledgebase/v1/account-details.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/accountDetails/client/index.ts b/src/api/resources/knowledgebase/resources/accountDetails/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountDetails/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/accountDetails/index.ts b/src/api/resources/knowledgebase/resources/accountDetails/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountDetails/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/accountToken/client/Client.ts b/src/api/resources/knowledgebase/resources/accountToken/client/Client.ts new file mode 100644 index 000000000..ecbeb0183 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountToken/client/Client.ts @@ -0,0 +1,133 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AccountToken { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class AccountToken { + protected readonly _options: AccountToken.Options; + + constructor(_options: AccountToken.Options) { + this._options = _options; + } + + /** + * Returns the account token for the end user with the provided public token. + * + * @param {string} publicToken + * @param {AccountToken.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.accountToken.retrieve("public_token") + */ + public retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(publicToken, requestOptions)); + } + + private async __retrieve( + publicToken: string, + requestOptions?: AccountToken.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/account-token/${encodeURIComponent(publicToken)}`, + ), + 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.knowledgebase.AccountToken.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 /knowledgebase/v1/account-token/{public_token}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/accountToken/client/index.ts b/src/api/resources/knowledgebase/resources/accountToken/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountToken/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/accountToken/index.ts b/src/api/resources/knowledgebase/resources/accountToken/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/accountToken/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/articles/client/Client.ts b/src/api/resources/knowledgebase/resources/articles/client/Client.ts new file mode 100644 index 000000000..7a2ac910e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/client/Client.ts @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Articles { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Articles { + protected readonly _options: Articles.Options; + + constructor(_options: Articles.Options) { + this._options = _options; + } + + /** + * Returns a list of `Article` objects. + * + * @param {Merge.knowledgebase.ArticlesListRequest} request + * @param {Articles.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.articles.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.ArticlesListRequest = {}, + requestOptions?: Articles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.ArticlesListRequest = {}, + requestOptions?: Articles.RequestOptions, + ): Promise> { + const { + createdAfter, + createdBefore, + cursor, + expand, + includeDeletedData, + includeRemoteData, + includeShellData, + modifiedAfter, + modifiedBefore, + pageSize, + parentArticleId, + parentContainerId, + remoteId, + type: type_, + } = request; + const _queryParams: Record = {}; + if (createdAfter != null) { + _queryParams["created_after"] = createdAfter.toISOString(); + } + + if (createdBefore != null) { + _queryParams["created_before"] = createdBefore.toISOString(); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.ArticlesListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeDeletedData != null) { + _queryParams["include_deleted_data"] = includeDeletedData.toString(); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + if (modifiedAfter != null) { + _queryParams["modified_after"] = modifiedAfter.toISOString(); + } + + if (modifiedBefore != null) { + _queryParams["modified_before"] = modifiedBefore.toISOString(); + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (parentArticleId != null) { + _queryParams["parent_article_id"] = parentArticleId; + } + + if (parentContainerId != null) { + _queryParams["parent_container_id"] = parentContainerId; + } + + if (remoteId != null) { + _queryParams["remote_id"] = remoteId; + } + + if (type_ != null) { + _queryParams["type"] = type_; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? 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, + "knowledgebase/v1/articles", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedArticleList.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 /knowledgebase/v1/articles."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns an `Article` object with the given `id`. + * + * @param {string} id + * @param {Merge.knowledgebase.ArticlesRetrieveRequest} request + * @param {Articles.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.articles.retrieve("id") + */ + public retrieve( + id: string, + request: Merge.knowledgebase.ArticlesRetrieveRequest = {}, + requestOptions?: Articles.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.knowledgebase.ArticlesRetrieveRequest = {}, + requestOptions?: Articles.RequestOptions, + ): Promise> { + const { expand, includeRemoteData, includeShellData } = request; + const _queryParams: Record = {}; + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.ArticlesRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/articles/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.Article.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 /knowledgebase/v1/articles/{id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/articles/client/index.ts b/src/api/resources/knowledgebase/resources/articles/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesListRequest.ts b/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesListRequest.ts new file mode 100644 index 000000000..e0b528a9e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesListRequest.ts @@ -0,0 +1,42 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface ArticlesListRequest { + /** If provided, will only return objects created after this datetime. */ + createdAfter?: Date; + /** If provided, will only return objects created before this datetime. */ + createdBefore?: Date; + /** The pagination cursor value. */ + cursor?: string; + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.ArticlesListRequestExpand; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + includeDeletedData?: boolean; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; + /** If provided, only objects synced by Merge after this date time will be returned. */ + modifiedAfter?: Date; + /** If provided, only objects synced by Merge before this date time will be returned. */ + modifiedBefore?: Date; + /** Number of results to return per page. */ + pageSize?: number; + /** If provided, will only return sub articles of the parent_article_id. */ + parentArticleId?: string; + /** If provided, will only return sub articles of the parent_container_id. */ + parentContainerId?: string; + /** The API provider's ID for the given object. */ + remoteId?: string; + /** If provided, will only return articles of the given type. */ + type?: string; +} diff --git a/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesRetrieveRequest.ts new file mode 100644 index 000000000..ba16f368f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/client/requests/ArticlesRetrieveRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * {} + */ +export interface ArticlesRetrieveRequest { + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.ArticlesRetrieveRequestExpand; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/articles/client/requests/index.ts b/src/api/resources/knowledgebase/resources/articles/client/requests/index.ts new file mode 100644 index 000000000..9337c36ea --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type ArticlesListRequest } from "./ArticlesListRequest"; +export { type ArticlesRetrieveRequest } from "./ArticlesRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/articles/index.ts b/src/api/resources/knowledgebase/resources/articles/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts b/src/api/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts new file mode 100644 index 000000000..ffe24f712 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts @@ -0,0 +1,291 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ArticlesListRequestExpand = + | "attachments" + | "attachments,author" + | "attachments,author,last_edited_by" + | "attachments,author,last_edited_by,parent_article" + | "attachments,author,last_edited_by,parent_article,parent_container" + | "attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "attachments,author,last_edited_by,parent_article,root_container" + | "attachments,author,last_edited_by,parent_container" + | "attachments,author,last_edited_by,parent_container,root_container" + | "attachments,author,last_edited_by,root_container" + | "attachments,author,parent_article" + | "attachments,author,parent_article,parent_container" + | "attachments,author,parent_article,parent_container,root_container" + | "attachments,author,parent_article,root_container" + | "attachments,author,parent_container" + | "attachments,author,parent_container,root_container" + | "attachments,author,root_container" + | "attachments,last_edited_by" + | "attachments,last_edited_by,parent_article" + | "attachments,last_edited_by,parent_article,parent_container" + | "attachments,last_edited_by,parent_article,parent_container,root_container" + | "attachments,last_edited_by,parent_article,root_container" + | "attachments,last_edited_by,parent_container" + | "attachments,last_edited_by,parent_container,root_container" + | "attachments,last_edited_by,root_container" + | "attachments,parent_article" + | "attachments,parent_article,parent_container" + | "attachments,parent_article,parent_container,root_container" + | "attachments,parent_article,root_container" + | "attachments,parent_container" + | "attachments,parent_container,root_container" + | "attachments,root_container" + | "author" + | "author,last_edited_by" + | "author,last_edited_by,parent_article" + | "author,last_edited_by,parent_article,parent_container" + | "author,last_edited_by,parent_article,parent_container,root_container" + | "author,last_edited_by,parent_article,root_container" + | "author,last_edited_by,parent_container" + | "author,last_edited_by,parent_container,root_container" + | "author,last_edited_by,root_container" + | "author,parent_article" + | "author,parent_article,parent_container" + | "author,parent_article,parent_container,root_container" + | "author,parent_article,root_container" + | "author,parent_container" + | "author,parent_container,root_container" + | "author,root_container" + | "last_edited_by" + | "last_edited_by,parent_article" + | "last_edited_by,parent_article,parent_container" + | "last_edited_by,parent_article,parent_container,root_container" + | "last_edited_by,parent_article,root_container" + | "last_edited_by,parent_container" + | "last_edited_by,parent_container,root_container" + | "last_edited_by,root_container" + | "parent_article" + | "parent_article,parent_container" + | "parent_article,parent_container,root_container" + | "parent_article,root_container" + | "parent_container" + | "parent_container,root_container" + | "permissions" + | "permissions,attachments" + | "permissions,attachments,author" + | "permissions,attachments,author,last_edited_by" + | "permissions,attachments,author,last_edited_by,parent_article" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,parent_article,root_container" + | "permissions,attachments,author,last_edited_by,parent_container" + | "permissions,attachments,author,last_edited_by,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,root_container" + | "permissions,attachments,author,parent_article" + | "permissions,attachments,author,parent_article,parent_container" + | "permissions,attachments,author,parent_article,parent_container,root_container" + | "permissions,attachments,author,parent_article,root_container" + | "permissions,attachments,author,parent_container" + | "permissions,attachments,author,parent_container,root_container" + | "permissions,attachments,author,root_container" + | "permissions,attachments,last_edited_by" + | "permissions,attachments,last_edited_by,parent_article" + | "permissions,attachments,last_edited_by,parent_article,parent_container" + | "permissions,attachments,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,last_edited_by,parent_article,root_container" + | "permissions,attachments,last_edited_by,parent_container" + | "permissions,attachments,last_edited_by,parent_container,root_container" + | "permissions,attachments,last_edited_by,root_container" + | "permissions,attachments,parent_article" + | "permissions,attachments,parent_article,parent_container" + | "permissions,attachments,parent_article,parent_container,root_container" + | "permissions,attachments,parent_article,root_container" + | "permissions,attachments,parent_container" + | "permissions,attachments,parent_container,root_container" + | "permissions,attachments,root_container" + | "permissions,author" + | "permissions,author,last_edited_by" + | "permissions,author,last_edited_by,parent_article" + | "permissions,author,last_edited_by,parent_article,parent_container" + | "permissions,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,author,last_edited_by,parent_article,root_container" + | "permissions,author,last_edited_by,parent_container" + | "permissions,author,last_edited_by,parent_container,root_container" + | "permissions,author,last_edited_by,root_container" + | "permissions,author,parent_article" + | "permissions,author,parent_article,parent_container" + | "permissions,author,parent_article,parent_container,root_container" + | "permissions,author,parent_article,root_container" + | "permissions,author,parent_container" + | "permissions,author,parent_container,root_container" + | "permissions,author,root_container" + | "permissions,last_edited_by" + | "permissions,last_edited_by,parent_article" + | "permissions,last_edited_by,parent_article,parent_container" + | "permissions,last_edited_by,parent_article,parent_container,root_container" + | "permissions,last_edited_by,parent_article,root_container" + | "permissions,last_edited_by,parent_container" + | "permissions,last_edited_by,parent_container,root_container" + | "permissions,last_edited_by,root_container" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_article,parent_container,root_container" + | "permissions,parent_article,root_container" + | "permissions,parent_container" + | "permissions,parent_container,root_container" + | "permissions,root_container" + | "root_container"; +export const ArticlesListRequestExpand = { + Attachments: "attachments", + AttachmentsAuthor: "attachments,author", + AttachmentsAuthorLastEditedBy: "attachments,author,last_edited_by", + AttachmentsAuthorLastEditedByParentArticle: "attachments,author,last_edited_by,parent_article", + AttachmentsAuthorLastEditedByParentArticleParentContainer: + "attachments,author,last_edited_by,parent_article,parent_container", + AttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer: + "attachments,author,last_edited_by,parent_article,parent_container,root_container", + AttachmentsAuthorLastEditedByParentArticleRootContainer: + "attachments,author,last_edited_by,parent_article,root_container", + AttachmentsAuthorLastEditedByParentContainer: "attachments,author,last_edited_by,parent_container", + AttachmentsAuthorLastEditedByParentContainerRootContainer: + "attachments,author,last_edited_by,parent_container,root_container", + AttachmentsAuthorLastEditedByRootContainer: "attachments,author,last_edited_by,root_container", + AttachmentsAuthorParentArticle: "attachments,author,parent_article", + AttachmentsAuthorParentArticleParentContainer: "attachments,author,parent_article,parent_container", + AttachmentsAuthorParentArticleParentContainerRootContainer: + "attachments,author,parent_article,parent_container,root_container", + AttachmentsAuthorParentArticleRootContainer: "attachments,author,parent_article,root_container", + AttachmentsAuthorParentContainer: "attachments,author,parent_container", + AttachmentsAuthorParentContainerRootContainer: "attachments,author,parent_container,root_container", + AttachmentsAuthorRootContainer: "attachments,author,root_container", + AttachmentsLastEditedBy: "attachments,last_edited_by", + AttachmentsLastEditedByParentArticle: "attachments,last_edited_by,parent_article", + AttachmentsLastEditedByParentArticleParentContainer: "attachments,last_edited_by,parent_article,parent_container", + AttachmentsLastEditedByParentArticleParentContainerRootContainer: + "attachments,last_edited_by,parent_article,parent_container,root_container", + AttachmentsLastEditedByParentArticleRootContainer: "attachments,last_edited_by,parent_article,root_container", + AttachmentsLastEditedByParentContainer: "attachments,last_edited_by,parent_container", + AttachmentsLastEditedByParentContainerRootContainer: "attachments,last_edited_by,parent_container,root_container", + AttachmentsLastEditedByRootContainer: "attachments,last_edited_by,root_container", + AttachmentsParentArticle: "attachments,parent_article", + AttachmentsParentArticleParentContainer: "attachments,parent_article,parent_container", + AttachmentsParentArticleParentContainerRootContainer: "attachments,parent_article,parent_container,root_container", + AttachmentsParentArticleRootContainer: "attachments,parent_article,root_container", + AttachmentsParentContainer: "attachments,parent_container", + AttachmentsParentContainerRootContainer: "attachments,parent_container,root_container", + AttachmentsRootContainer: "attachments,root_container", + Author: "author", + AuthorLastEditedBy: "author,last_edited_by", + AuthorLastEditedByParentArticle: "author,last_edited_by,parent_article", + AuthorLastEditedByParentArticleParentContainer: "author,last_edited_by,parent_article,parent_container", + AuthorLastEditedByParentArticleParentContainerRootContainer: + "author,last_edited_by,parent_article,parent_container,root_container", + AuthorLastEditedByParentArticleRootContainer: "author,last_edited_by,parent_article,root_container", + AuthorLastEditedByParentContainer: "author,last_edited_by,parent_container", + AuthorLastEditedByParentContainerRootContainer: "author,last_edited_by,parent_container,root_container", + AuthorLastEditedByRootContainer: "author,last_edited_by,root_container", + AuthorParentArticle: "author,parent_article", + AuthorParentArticleParentContainer: "author,parent_article,parent_container", + AuthorParentArticleParentContainerRootContainer: "author,parent_article,parent_container,root_container", + AuthorParentArticleRootContainer: "author,parent_article,root_container", + AuthorParentContainer: "author,parent_container", + AuthorParentContainerRootContainer: "author,parent_container,root_container", + AuthorRootContainer: "author,root_container", + LastEditedBy: "last_edited_by", + LastEditedByParentArticle: "last_edited_by,parent_article", + LastEditedByParentArticleParentContainer: "last_edited_by,parent_article,parent_container", + LastEditedByParentArticleParentContainerRootContainer: + "last_edited_by,parent_article,parent_container,root_container", + LastEditedByParentArticleRootContainer: "last_edited_by,parent_article,root_container", + LastEditedByParentContainer: "last_edited_by,parent_container", + LastEditedByParentContainerRootContainer: "last_edited_by,parent_container,root_container", + LastEditedByRootContainer: "last_edited_by,root_container", + ParentArticle: "parent_article", + ParentArticleParentContainer: "parent_article,parent_container", + ParentArticleParentContainerRootContainer: "parent_article,parent_container,root_container", + ParentArticleRootContainer: "parent_article,root_container", + ParentContainer: "parent_container", + ParentContainerRootContainer: "parent_container,root_container", + Permissions: "permissions", + PermissionsAttachments: "permissions,attachments", + PermissionsAttachmentsAuthor: "permissions,attachments,author", + PermissionsAttachmentsAuthorLastEditedBy: "permissions,attachments,author,last_edited_by", + PermissionsAttachmentsAuthorLastEditedByParentArticle: + "permissions,attachments,author,last_edited_by,parent_article", + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainer: + "permissions,attachments,author,last_edited_by,parent_article,parent_container", + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer: + "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container", + PermissionsAttachmentsAuthorLastEditedByParentArticleRootContainer: + "permissions,attachments,author,last_edited_by,parent_article,root_container", + PermissionsAttachmentsAuthorLastEditedByParentContainer: + "permissions,attachments,author,last_edited_by,parent_container", + PermissionsAttachmentsAuthorLastEditedByParentContainerRootContainer: + "permissions,attachments,author,last_edited_by,parent_container,root_container", + PermissionsAttachmentsAuthorLastEditedByRootContainer: + "permissions,attachments,author,last_edited_by,root_container", + PermissionsAttachmentsAuthorParentArticle: "permissions,attachments,author,parent_article", + PermissionsAttachmentsAuthorParentArticleParentContainer: + "permissions,attachments,author,parent_article,parent_container", + PermissionsAttachmentsAuthorParentArticleParentContainerRootContainer: + "permissions,attachments,author,parent_article,parent_container,root_container", + PermissionsAttachmentsAuthorParentArticleRootContainer: + "permissions,attachments,author,parent_article,root_container", + PermissionsAttachmentsAuthorParentContainer: "permissions,attachments,author,parent_container", + PermissionsAttachmentsAuthorParentContainerRootContainer: + "permissions,attachments,author,parent_container,root_container", + PermissionsAttachmentsAuthorRootContainer: "permissions,attachments,author,root_container", + PermissionsAttachmentsLastEditedBy: "permissions,attachments,last_edited_by", + PermissionsAttachmentsLastEditedByParentArticle: "permissions,attachments,last_edited_by,parent_article", + PermissionsAttachmentsLastEditedByParentArticleParentContainer: + "permissions,attachments,last_edited_by,parent_article,parent_container", + PermissionsAttachmentsLastEditedByParentArticleParentContainerRootContainer: + "permissions,attachments,last_edited_by,parent_article,parent_container,root_container", + PermissionsAttachmentsLastEditedByParentArticleRootContainer: + "permissions,attachments,last_edited_by,parent_article,root_container", + PermissionsAttachmentsLastEditedByParentContainer: "permissions,attachments,last_edited_by,parent_container", + PermissionsAttachmentsLastEditedByParentContainerRootContainer: + "permissions,attachments,last_edited_by,parent_container,root_container", + PermissionsAttachmentsLastEditedByRootContainer: "permissions,attachments,last_edited_by,root_container", + PermissionsAttachmentsParentArticle: "permissions,attachments,parent_article", + PermissionsAttachmentsParentArticleParentContainer: "permissions,attachments,parent_article,parent_container", + PermissionsAttachmentsParentArticleParentContainerRootContainer: + "permissions,attachments,parent_article,parent_container,root_container", + PermissionsAttachmentsParentArticleRootContainer: "permissions,attachments,parent_article,root_container", + PermissionsAttachmentsParentContainer: "permissions,attachments,parent_container", + PermissionsAttachmentsParentContainerRootContainer: "permissions,attachments,parent_container,root_container", + PermissionsAttachmentsRootContainer: "permissions,attachments,root_container", + PermissionsAuthor: "permissions,author", + PermissionsAuthorLastEditedBy: "permissions,author,last_edited_by", + PermissionsAuthorLastEditedByParentArticle: "permissions,author,last_edited_by,parent_article", + PermissionsAuthorLastEditedByParentArticleParentContainer: + "permissions,author,last_edited_by,parent_article,parent_container", + PermissionsAuthorLastEditedByParentArticleParentContainerRootContainer: + "permissions,author,last_edited_by,parent_article,parent_container,root_container", + PermissionsAuthorLastEditedByParentArticleRootContainer: + "permissions,author,last_edited_by,parent_article,root_container", + PermissionsAuthorLastEditedByParentContainer: "permissions,author,last_edited_by,parent_container", + PermissionsAuthorLastEditedByParentContainerRootContainer: + "permissions,author,last_edited_by,parent_container,root_container", + PermissionsAuthorLastEditedByRootContainer: "permissions,author,last_edited_by,root_container", + PermissionsAuthorParentArticle: "permissions,author,parent_article", + PermissionsAuthorParentArticleParentContainer: "permissions,author,parent_article,parent_container", + PermissionsAuthorParentArticleParentContainerRootContainer: + "permissions,author,parent_article,parent_container,root_container", + PermissionsAuthorParentArticleRootContainer: "permissions,author,parent_article,root_container", + PermissionsAuthorParentContainer: "permissions,author,parent_container", + PermissionsAuthorParentContainerRootContainer: "permissions,author,parent_container,root_container", + PermissionsAuthorRootContainer: "permissions,author,root_container", + PermissionsLastEditedBy: "permissions,last_edited_by", + PermissionsLastEditedByParentArticle: "permissions,last_edited_by,parent_article", + PermissionsLastEditedByParentArticleParentContainer: "permissions,last_edited_by,parent_article,parent_container", + PermissionsLastEditedByParentArticleParentContainerRootContainer: + "permissions,last_edited_by,parent_article,parent_container,root_container", + PermissionsLastEditedByParentArticleRootContainer: "permissions,last_edited_by,parent_article,root_container", + PermissionsLastEditedByParentContainer: "permissions,last_edited_by,parent_container", + PermissionsLastEditedByParentContainerRootContainer: "permissions,last_edited_by,parent_container,root_container", + PermissionsLastEditedByRootContainer: "permissions,last_edited_by,root_container", + PermissionsParentArticle: "permissions,parent_article", + PermissionsParentArticleParentContainer: "permissions,parent_article,parent_container", + PermissionsParentArticleParentContainerRootContainer: "permissions,parent_article,parent_container,root_container", + PermissionsParentArticleRootContainer: "permissions,parent_article,root_container", + PermissionsParentContainer: "permissions,parent_container", + PermissionsParentContainerRootContainer: "permissions,parent_container,root_container", + PermissionsRootContainer: "permissions,root_container", + RootContainer: "root_container", +} as const; diff --git a/src/api/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts b/src/api/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts new file mode 100644 index 000000000..c4e63ee7a --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts @@ -0,0 +1,291 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ArticlesRetrieveRequestExpand = + | "attachments" + | "attachments,author" + | "attachments,author,last_edited_by" + | "attachments,author,last_edited_by,parent_article" + | "attachments,author,last_edited_by,parent_article,parent_container" + | "attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "attachments,author,last_edited_by,parent_article,root_container" + | "attachments,author,last_edited_by,parent_container" + | "attachments,author,last_edited_by,parent_container,root_container" + | "attachments,author,last_edited_by,root_container" + | "attachments,author,parent_article" + | "attachments,author,parent_article,parent_container" + | "attachments,author,parent_article,parent_container,root_container" + | "attachments,author,parent_article,root_container" + | "attachments,author,parent_container" + | "attachments,author,parent_container,root_container" + | "attachments,author,root_container" + | "attachments,last_edited_by" + | "attachments,last_edited_by,parent_article" + | "attachments,last_edited_by,parent_article,parent_container" + | "attachments,last_edited_by,parent_article,parent_container,root_container" + | "attachments,last_edited_by,parent_article,root_container" + | "attachments,last_edited_by,parent_container" + | "attachments,last_edited_by,parent_container,root_container" + | "attachments,last_edited_by,root_container" + | "attachments,parent_article" + | "attachments,parent_article,parent_container" + | "attachments,parent_article,parent_container,root_container" + | "attachments,parent_article,root_container" + | "attachments,parent_container" + | "attachments,parent_container,root_container" + | "attachments,root_container" + | "author" + | "author,last_edited_by" + | "author,last_edited_by,parent_article" + | "author,last_edited_by,parent_article,parent_container" + | "author,last_edited_by,parent_article,parent_container,root_container" + | "author,last_edited_by,parent_article,root_container" + | "author,last_edited_by,parent_container" + | "author,last_edited_by,parent_container,root_container" + | "author,last_edited_by,root_container" + | "author,parent_article" + | "author,parent_article,parent_container" + | "author,parent_article,parent_container,root_container" + | "author,parent_article,root_container" + | "author,parent_container" + | "author,parent_container,root_container" + | "author,root_container" + | "last_edited_by" + | "last_edited_by,parent_article" + | "last_edited_by,parent_article,parent_container" + | "last_edited_by,parent_article,parent_container,root_container" + | "last_edited_by,parent_article,root_container" + | "last_edited_by,parent_container" + | "last_edited_by,parent_container,root_container" + | "last_edited_by,root_container" + | "parent_article" + | "parent_article,parent_container" + | "parent_article,parent_container,root_container" + | "parent_article,root_container" + | "parent_container" + | "parent_container,root_container" + | "permissions" + | "permissions,attachments" + | "permissions,attachments,author" + | "permissions,attachments,author,last_edited_by" + | "permissions,attachments,author,last_edited_by,parent_article" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,parent_article,root_container" + | "permissions,attachments,author,last_edited_by,parent_container" + | "permissions,attachments,author,last_edited_by,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,root_container" + | "permissions,attachments,author,parent_article" + | "permissions,attachments,author,parent_article,parent_container" + | "permissions,attachments,author,parent_article,parent_container,root_container" + | "permissions,attachments,author,parent_article,root_container" + | "permissions,attachments,author,parent_container" + | "permissions,attachments,author,parent_container,root_container" + | "permissions,attachments,author,root_container" + | "permissions,attachments,last_edited_by" + | "permissions,attachments,last_edited_by,parent_article" + | "permissions,attachments,last_edited_by,parent_article,parent_container" + | "permissions,attachments,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,last_edited_by,parent_article,root_container" + | "permissions,attachments,last_edited_by,parent_container" + | "permissions,attachments,last_edited_by,parent_container,root_container" + | "permissions,attachments,last_edited_by,root_container" + | "permissions,attachments,parent_article" + | "permissions,attachments,parent_article,parent_container" + | "permissions,attachments,parent_article,parent_container,root_container" + | "permissions,attachments,parent_article,root_container" + | "permissions,attachments,parent_container" + | "permissions,attachments,parent_container,root_container" + | "permissions,attachments,root_container" + | "permissions,author" + | "permissions,author,last_edited_by" + | "permissions,author,last_edited_by,parent_article" + | "permissions,author,last_edited_by,parent_article,parent_container" + | "permissions,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,author,last_edited_by,parent_article,root_container" + | "permissions,author,last_edited_by,parent_container" + | "permissions,author,last_edited_by,parent_container,root_container" + | "permissions,author,last_edited_by,root_container" + | "permissions,author,parent_article" + | "permissions,author,parent_article,parent_container" + | "permissions,author,parent_article,parent_container,root_container" + | "permissions,author,parent_article,root_container" + | "permissions,author,parent_container" + | "permissions,author,parent_container,root_container" + | "permissions,author,root_container" + | "permissions,last_edited_by" + | "permissions,last_edited_by,parent_article" + | "permissions,last_edited_by,parent_article,parent_container" + | "permissions,last_edited_by,parent_article,parent_container,root_container" + | "permissions,last_edited_by,parent_article,root_container" + | "permissions,last_edited_by,parent_container" + | "permissions,last_edited_by,parent_container,root_container" + | "permissions,last_edited_by,root_container" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_article,parent_container,root_container" + | "permissions,parent_article,root_container" + | "permissions,parent_container" + | "permissions,parent_container,root_container" + | "permissions,root_container" + | "root_container"; +export const ArticlesRetrieveRequestExpand = { + Attachments: "attachments", + AttachmentsAuthor: "attachments,author", + AttachmentsAuthorLastEditedBy: "attachments,author,last_edited_by", + AttachmentsAuthorLastEditedByParentArticle: "attachments,author,last_edited_by,parent_article", + AttachmentsAuthorLastEditedByParentArticleParentContainer: + "attachments,author,last_edited_by,parent_article,parent_container", + AttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer: + "attachments,author,last_edited_by,parent_article,parent_container,root_container", + AttachmentsAuthorLastEditedByParentArticleRootContainer: + "attachments,author,last_edited_by,parent_article,root_container", + AttachmentsAuthorLastEditedByParentContainer: "attachments,author,last_edited_by,parent_container", + AttachmentsAuthorLastEditedByParentContainerRootContainer: + "attachments,author,last_edited_by,parent_container,root_container", + AttachmentsAuthorLastEditedByRootContainer: "attachments,author,last_edited_by,root_container", + AttachmentsAuthorParentArticle: "attachments,author,parent_article", + AttachmentsAuthorParentArticleParentContainer: "attachments,author,parent_article,parent_container", + AttachmentsAuthorParentArticleParentContainerRootContainer: + "attachments,author,parent_article,parent_container,root_container", + AttachmentsAuthorParentArticleRootContainer: "attachments,author,parent_article,root_container", + AttachmentsAuthorParentContainer: "attachments,author,parent_container", + AttachmentsAuthorParentContainerRootContainer: "attachments,author,parent_container,root_container", + AttachmentsAuthorRootContainer: "attachments,author,root_container", + AttachmentsLastEditedBy: "attachments,last_edited_by", + AttachmentsLastEditedByParentArticle: "attachments,last_edited_by,parent_article", + AttachmentsLastEditedByParentArticleParentContainer: "attachments,last_edited_by,parent_article,parent_container", + AttachmentsLastEditedByParentArticleParentContainerRootContainer: + "attachments,last_edited_by,parent_article,parent_container,root_container", + AttachmentsLastEditedByParentArticleRootContainer: "attachments,last_edited_by,parent_article,root_container", + AttachmentsLastEditedByParentContainer: "attachments,last_edited_by,parent_container", + AttachmentsLastEditedByParentContainerRootContainer: "attachments,last_edited_by,parent_container,root_container", + AttachmentsLastEditedByRootContainer: "attachments,last_edited_by,root_container", + AttachmentsParentArticle: "attachments,parent_article", + AttachmentsParentArticleParentContainer: "attachments,parent_article,parent_container", + AttachmentsParentArticleParentContainerRootContainer: "attachments,parent_article,parent_container,root_container", + AttachmentsParentArticleRootContainer: "attachments,parent_article,root_container", + AttachmentsParentContainer: "attachments,parent_container", + AttachmentsParentContainerRootContainer: "attachments,parent_container,root_container", + AttachmentsRootContainer: "attachments,root_container", + Author: "author", + AuthorLastEditedBy: "author,last_edited_by", + AuthorLastEditedByParentArticle: "author,last_edited_by,parent_article", + AuthorLastEditedByParentArticleParentContainer: "author,last_edited_by,parent_article,parent_container", + AuthorLastEditedByParentArticleParentContainerRootContainer: + "author,last_edited_by,parent_article,parent_container,root_container", + AuthorLastEditedByParentArticleRootContainer: "author,last_edited_by,parent_article,root_container", + AuthorLastEditedByParentContainer: "author,last_edited_by,parent_container", + AuthorLastEditedByParentContainerRootContainer: "author,last_edited_by,parent_container,root_container", + AuthorLastEditedByRootContainer: "author,last_edited_by,root_container", + AuthorParentArticle: "author,parent_article", + AuthorParentArticleParentContainer: "author,parent_article,parent_container", + AuthorParentArticleParentContainerRootContainer: "author,parent_article,parent_container,root_container", + AuthorParentArticleRootContainer: "author,parent_article,root_container", + AuthorParentContainer: "author,parent_container", + AuthorParentContainerRootContainer: "author,parent_container,root_container", + AuthorRootContainer: "author,root_container", + LastEditedBy: "last_edited_by", + LastEditedByParentArticle: "last_edited_by,parent_article", + LastEditedByParentArticleParentContainer: "last_edited_by,parent_article,parent_container", + LastEditedByParentArticleParentContainerRootContainer: + "last_edited_by,parent_article,parent_container,root_container", + LastEditedByParentArticleRootContainer: "last_edited_by,parent_article,root_container", + LastEditedByParentContainer: "last_edited_by,parent_container", + LastEditedByParentContainerRootContainer: "last_edited_by,parent_container,root_container", + LastEditedByRootContainer: "last_edited_by,root_container", + ParentArticle: "parent_article", + ParentArticleParentContainer: "parent_article,parent_container", + ParentArticleParentContainerRootContainer: "parent_article,parent_container,root_container", + ParentArticleRootContainer: "parent_article,root_container", + ParentContainer: "parent_container", + ParentContainerRootContainer: "parent_container,root_container", + Permissions: "permissions", + PermissionsAttachments: "permissions,attachments", + PermissionsAttachmentsAuthor: "permissions,attachments,author", + PermissionsAttachmentsAuthorLastEditedBy: "permissions,attachments,author,last_edited_by", + PermissionsAttachmentsAuthorLastEditedByParentArticle: + "permissions,attachments,author,last_edited_by,parent_article", + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainer: + "permissions,attachments,author,last_edited_by,parent_article,parent_container", + PermissionsAttachmentsAuthorLastEditedByParentArticleParentContainerRootContainer: + "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container", + PermissionsAttachmentsAuthorLastEditedByParentArticleRootContainer: + "permissions,attachments,author,last_edited_by,parent_article,root_container", + PermissionsAttachmentsAuthorLastEditedByParentContainer: + "permissions,attachments,author,last_edited_by,parent_container", + PermissionsAttachmentsAuthorLastEditedByParentContainerRootContainer: + "permissions,attachments,author,last_edited_by,parent_container,root_container", + PermissionsAttachmentsAuthorLastEditedByRootContainer: + "permissions,attachments,author,last_edited_by,root_container", + PermissionsAttachmentsAuthorParentArticle: "permissions,attachments,author,parent_article", + PermissionsAttachmentsAuthorParentArticleParentContainer: + "permissions,attachments,author,parent_article,parent_container", + PermissionsAttachmentsAuthorParentArticleParentContainerRootContainer: + "permissions,attachments,author,parent_article,parent_container,root_container", + PermissionsAttachmentsAuthorParentArticleRootContainer: + "permissions,attachments,author,parent_article,root_container", + PermissionsAttachmentsAuthorParentContainer: "permissions,attachments,author,parent_container", + PermissionsAttachmentsAuthorParentContainerRootContainer: + "permissions,attachments,author,parent_container,root_container", + PermissionsAttachmentsAuthorRootContainer: "permissions,attachments,author,root_container", + PermissionsAttachmentsLastEditedBy: "permissions,attachments,last_edited_by", + PermissionsAttachmentsLastEditedByParentArticle: "permissions,attachments,last_edited_by,parent_article", + PermissionsAttachmentsLastEditedByParentArticleParentContainer: + "permissions,attachments,last_edited_by,parent_article,parent_container", + PermissionsAttachmentsLastEditedByParentArticleParentContainerRootContainer: + "permissions,attachments,last_edited_by,parent_article,parent_container,root_container", + PermissionsAttachmentsLastEditedByParentArticleRootContainer: + "permissions,attachments,last_edited_by,parent_article,root_container", + PermissionsAttachmentsLastEditedByParentContainer: "permissions,attachments,last_edited_by,parent_container", + PermissionsAttachmentsLastEditedByParentContainerRootContainer: + "permissions,attachments,last_edited_by,parent_container,root_container", + PermissionsAttachmentsLastEditedByRootContainer: "permissions,attachments,last_edited_by,root_container", + PermissionsAttachmentsParentArticle: "permissions,attachments,parent_article", + PermissionsAttachmentsParentArticleParentContainer: "permissions,attachments,parent_article,parent_container", + PermissionsAttachmentsParentArticleParentContainerRootContainer: + "permissions,attachments,parent_article,parent_container,root_container", + PermissionsAttachmentsParentArticleRootContainer: "permissions,attachments,parent_article,root_container", + PermissionsAttachmentsParentContainer: "permissions,attachments,parent_container", + PermissionsAttachmentsParentContainerRootContainer: "permissions,attachments,parent_container,root_container", + PermissionsAttachmentsRootContainer: "permissions,attachments,root_container", + PermissionsAuthor: "permissions,author", + PermissionsAuthorLastEditedBy: "permissions,author,last_edited_by", + PermissionsAuthorLastEditedByParentArticle: "permissions,author,last_edited_by,parent_article", + PermissionsAuthorLastEditedByParentArticleParentContainer: + "permissions,author,last_edited_by,parent_article,parent_container", + PermissionsAuthorLastEditedByParentArticleParentContainerRootContainer: + "permissions,author,last_edited_by,parent_article,parent_container,root_container", + PermissionsAuthorLastEditedByParentArticleRootContainer: + "permissions,author,last_edited_by,parent_article,root_container", + PermissionsAuthorLastEditedByParentContainer: "permissions,author,last_edited_by,parent_container", + PermissionsAuthorLastEditedByParentContainerRootContainer: + "permissions,author,last_edited_by,parent_container,root_container", + PermissionsAuthorLastEditedByRootContainer: "permissions,author,last_edited_by,root_container", + PermissionsAuthorParentArticle: "permissions,author,parent_article", + PermissionsAuthorParentArticleParentContainer: "permissions,author,parent_article,parent_container", + PermissionsAuthorParentArticleParentContainerRootContainer: + "permissions,author,parent_article,parent_container,root_container", + PermissionsAuthorParentArticleRootContainer: "permissions,author,parent_article,root_container", + PermissionsAuthorParentContainer: "permissions,author,parent_container", + PermissionsAuthorParentContainerRootContainer: "permissions,author,parent_container,root_container", + PermissionsAuthorRootContainer: "permissions,author,root_container", + PermissionsLastEditedBy: "permissions,last_edited_by", + PermissionsLastEditedByParentArticle: "permissions,last_edited_by,parent_article", + PermissionsLastEditedByParentArticleParentContainer: "permissions,last_edited_by,parent_article,parent_container", + PermissionsLastEditedByParentArticleParentContainerRootContainer: + "permissions,last_edited_by,parent_article,parent_container,root_container", + PermissionsLastEditedByParentArticleRootContainer: "permissions,last_edited_by,parent_article,root_container", + PermissionsLastEditedByParentContainer: "permissions,last_edited_by,parent_container", + PermissionsLastEditedByParentContainerRootContainer: "permissions,last_edited_by,parent_container,root_container", + PermissionsLastEditedByRootContainer: "permissions,last_edited_by,root_container", + PermissionsParentArticle: "permissions,parent_article", + PermissionsParentArticleParentContainer: "permissions,parent_article,parent_container", + PermissionsParentArticleParentContainerRootContainer: "permissions,parent_article,parent_container,root_container", + PermissionsParentArticleRootContainer: "permissions,parent_article,root_container", + PermissionsParentContainer: "permissions,parent_container", + PermissionsParentContainerRootContainer: "permissions,parent_container,root_container", + PermissionsRootContainer: "permissions,root_container", + RootContainer: "root_container", +} as const; diff --git a/src/api/resources/knowledgebase/resources/articles/types/index.ts b/src/api/resources/knowledgebase/resources/articles/types/index.ts new file mode 100644 index 000000000..91a0978bc --- /dev/null +++ b/src/api/resources/knowledgebase/resources/articles/types/index.ts @@ -0,0 +1,2 @@ +export * from "./ArticlesListRequestExpand"; +export * from "./ArticlesRetrieveRequestExpand"; diff --git a/src/api/resources/knowledgebase/resources/asyncPassthrough/client/Client.ts b/src/api/resources/knowledgebase/resources/asyncPassthrough/client/Client.ts new file mode 100644 index 000000000..6b806aa14 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/asyncPassthrough/client/Client.ts @@ -0,0 +1,223 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AsyncPassthrough { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class AsyncPassthrough { + protected readonly _options: AsyncPassthrough.Options; + + constructor(_options: AsyncPassthrough.Options) { + this._options = _options; + } + + /** + * Asynchronously pull data from an endpoint not currently supported by Merge. + * + * @param {Merge.knowledgebase.DataPassthroughRequest} request + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.asyncPassthrough.create({ + * method: "GET", + * path: "/scooters" + * }) + */ + public create( + request: Merge.knowledgebase.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.DataPassthroughRequest, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/async-passthrough", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.DataPassthroughRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.AsyncPassthroughReciept.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 POST /knowledgebase/v1/async-passthrough.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Retrieves data from earlier async-passthrough POST request + * + * @param {string} asyncPassthroughReceiptId + * @param {AsyncPassthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.asyncPassthrough.retrieve("async_passthrough_receipt_id") + */ + public retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(asyncPassthroughReceiptId, requestOptions)); + } + + private async __retrieve( + asyncPassthroughReceiptId: string, + requestOptions?: AsyncPassthrough.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/async-passthrough/${encodeURIComponent(asyncPassthroughReceiptId)}`, + ), + 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.knowledgebase.AsyncPassthroughRetrieveResponse.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 /knowledgebase/v1/async-passthrough/{async_passthrough_receipt_id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/asyncPassthrough/client/index.ts b/src/api/resources/knowledgebase/resources/asyncPassthrough/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/asyncPassthrough/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/asyncPassthrough/index.ts b/src/api/resources/knowledgebase/resources/asyncPassthrough/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/asyncPassthrough/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/api/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts new file mode 100644 index 000000000..299f21020 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../index"; + +export type AsyncPassthroughRetrieveResponse = Merge.knowledgebase.RemoteResponse | string; diff --git a/src/api/resources/knowledgebase/resources/asyncPassthrough/types/index.ts b/src/api/resources/knowledgebase/resources/asyncPassthrough/types/index.ts new file mode 100644 index 000000000..f2b2d0e21 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/asyncPassthrough/types/index.ts @@ -0,0 +1 @@ +export * from "./AsyncPassthroughRetrieveResponse"; diff --git a/src/api/resources/knowledgebase/resources/attachments/client/Client.ts b/src/api/resources/knowledgebase/resources/attachments/client/Client.ts new file mode 100644 index 000000000..8ef77596c --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/client/Client.ts @@ -0,0 +1,281 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Attachments { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Attachments { + protected readonly _options: Attachments.Options; + + constructor(_options: Attachments.Options) { + this._options = _options; + } + + /** + * Returns a list of `Attachment` objects. + * + * @param {Merge.knowledgebase.AttachmentsListRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.attachments.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.AttachmentsListRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.AttachmentsListRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { + const { + createdAfter, + createdBefore, + cursor, + includeDeletedData, + includeRemoteData, + includeShellData, + modifiedAfter, + modifiedBefore, + pageSize, + remoteId, + } = request; + const _queryParams: Record = {}; + if (createdAfter != null) { + _queryParams["created_after"] = createdAfter.toISOString(); + } + + if (createdBefore != null) { + _queryParams["created_before"] = createdBefore.toISOString(); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (includeDeletedData != null) { + _queryParams["include_deleted_data"] = includeDeletedData.toString(); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + if (modifiedAfter != null) { + _queryParams["modified_after"] = modifiedAfter.toISOString(); + } + + if (modifiedBefore != null) { + _queryParams["modified_before"] = modifiedBefore.toISOString(); + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (remoteId != null) { + _queryParams["remote_id"] = remoteId; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/attachments", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedAttachmentList.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 /knowledgebase/v1/attachments."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns an `Attachment` object with the given `id`. + * + * @param {string} id + * @param {Merge.knowledgebase.AttachmentsRetrieveRequest} request + * @param {Attachments.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.attachments.retrieve("id") + */ + public retrieve( + id: string, + request: Merge.knowledgebase.AttachmentsRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.knowledgebase.AttachmentsRetrieveRequest = {}, + requestOptions?: Attachments.RequestOptions, + ): Promise> { + const { includeRemoteData, includeShellData } = request; + const _queryParams: Record = {}; + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/attachments/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.Attachment.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 /knowledgebase/v1/attachments/{id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/attachments/client/index.ts b/src/api/resources/knowledgebase/resources/attachments/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsListRequest.ts b/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsListRequest.ts new file mode 100644 index 000000000..41c8fd3eb --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsListRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface AttachmentsListRequest { + /** If provided, will only return objects created after this datetime. */ + createdAfter?: Date; + /** If provided, will only return objects created before this datetime. */ + createdBefore?: Date; + /** The pagination cursor value. */ + cursor?: string; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + includeDeletedData?: boolean; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; + /** If provided, only objects synced by Merge after this date time will be returned. */ + modifiedAfter?: Date; + /** If provided, only objects synced by Merge before this date time will be returned. */ + modifiedBefore?: Date; + /** Number of results to return per page. */ + pageSize?: number; + /** The API provider's ID for the given object. */ + remoteId?: string; +} diff --git a/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts new file mode 100644 index 000000000..75983eb0b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/client/requests/AttachmentsRetrieveRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface AttachmentsRetrieveRequest { + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/attachments/client/requests/index.ts b/src/api/resources/knowledgebase/resources/attachments/client/requests/index.ts new file mode 100644 index 000000000..16edd8a2d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type AttachmentsListRequest } from "./AttachmentsListRequest"; +export { type AttachmentsRetrieveRequest } from "./AttachmentsRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/attachments/index.ts b/src/api/resources/knowledgebase/resources/attachments/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/attachments/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/auditTrail/client/Client.ts b/src/api/resources/knowledgebase/resources/auditTrail/client/Client.ts new file mode 100644 index 000000000..8a3ecae29 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/auditTrail/client/Client.ts @@ -0,0 +1,159 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AuditTrail { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class AuditTrail { + protected readonly _options: AuditTrail.Options; + + constructor(_options: AuditTrail.Options) { + this._options = _options; + } + + /** + * Gets a list of audit trail events. + * + * @param {Merge.knowledgebase.AuditTrailListRequest} request + * @param {AuditTrail.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.auditTrail.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.AuditTrailListRequest = {}, + requestOptions?: AuditTrail.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.AuditTrailListRequest = {}, + requestOptions?: AuditTrail.RequestOptions, + ): Promise> { + const { cursor, endDate, eventType, pageSize, startDate, userEmail } = request; + const _queryParams: Record = {}; + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (endDate != null) { + _queryParams["end_date"] = endDate; + } + + if (eventType != null) { + _queryParams["event_type"] = eventType; + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (startDate != null) { + _queryParams["start_date"] = startDate; + } + + if (userEmail != null) { + _queryParams["user_email"] = userEmail; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/audit-trail", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedAuditLogEventList.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 /knowledgebase/v1/audit-trail."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/auditTrail/client/index.ts b/src/api/resources/knowledgebase/resources/auditTrail/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/auditTrail/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/auditTrail/client/requests/AuditTrailListRequest.ts b/src/api/resources/knowledgebase/resources/auditTrail/client/requests/AuditTrailListRequest.ts new file mode 100644 index 000000000..351c48dc5 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/auditTrail/client/requests/AuditTrailListRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface AuditTrailListRequest { + /** The pagination cursor value. */ + cursor?: string; + /** If included, will only include audit trail events that occurred before this time */ + endDate?: string; + /** If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` */ + eventType?: string; + /** Number of results to return per page. */ + pageSize?: number; + /** If included, will only include audit trail events that occurred after this time */ + startDate?: string; + /** If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. */ + userEmail?: string; +} diff --git a/src/api/resources/knowledgebase/resources/auditTrail/client/requests/index.ts b/src/api/resources/knowledgebase/resources/auditTrail/client/requests/index.ts new file mode 100644 index 000000000..2c0762c28 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/auditTrail/client/requests/index.ts @@ -0,0 +1 @@ +export { type AuditTrailListRequest } from "./AuditTrailListRequest"; diff --git a/src/api/resources/knowledgebase/resources/auditTrail/index.ts b/src/api/resources/knowledgebase/resources/auditTrail/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/auditTrail/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/availableActions/client/Client.ts b/src/api/resources/knowledgebase/resources/availableActions/client/Client.ts new file mode 100644 index 000000000..9ff7ee7e5 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/availableActions/client/Client.ts @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace AvailableActions { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class AvailableActions { + protected readonly _options: AvailableActions.Options; + + constructor(_options: AvailableActions.Options) { + this._options = _options; + } + + /** + * Returns a list of models and actions available for an account. + * + * @param {AvailableActions.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.availableActions.retrieve() + */ + public retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(requestOptions)); + } + + private async __retrieve( + requestOptions?: AvailableActions.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/available-actions", + ), + 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.knowledgebase.AvailableActions.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 /knowledgebase/v1/available-actions.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/availableActions/client/index.ts b/src/api/resources/knowledgebase/resources/availableActions/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/availableActions/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/availableActions/index.ts b/src/api/resources/knowledgebase/resources/availableActions/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/availableActions/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/containers/client/Client.ts b/src/api/resources/knowledgebase/resources/containers/client/Client.ts new file mode 100644 index 000000000..b3f938109 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/client/Client.ts @@ -0,0 +1,309 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Containers { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Containers { + protected readonly _options: Containers.Options; + + constructor(_options: Containers.Options) { + this._options = _options; + } + + /** + * Returns a list of `Container` objects. + * + * @param {Merge.knowledgebase.ContainersListRequest} request + * @param {Containers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.containers.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.ContainersListRequest = {}, + requestOptions?: Containers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.ContainersListRequest = {}, + requestOptions?: Containers.RequestOptions, + ): Promise> { + const { + createdAfter, + createdBefore, + cursor, + expand, + includeDeletedData, + includeRemoteData, + includeShellData, + modifiedAfter, + modifiedBefore, + pageSize, + parentArticleId, + parentContainerId, + remoteId, + type: type_, + } = request; + const _queryParams: Record = {}; + if (createdAfter != null) { + _queryParams["created_after"] = createdAfter.toISOString(); + } + + if (createdBefore != null) { + _queryParams["created_before"] = createdBefore.toISOString(); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.ContainersListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeDeletedData != null) { + _queryParams["include_deleted_data"] = includeDeletedData.toString(); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + if (modifiedAfter != null) { + _queryParams["modified_after"] = modifiedAfter.toISOString(); + } + + if (modifiedBefore != null) { + _queryParams["modified_before"] = modifiedBefore.toISOString(); + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (parentArticleId != null) { + _queryParams["parent_article_id"] = parentArticleId; + } + + if (parentContainerId != null) { + _queryParams["parent_container_id"] = parentContainerId; + } + + if (remoteId != null) { + _queryParams["remote_id"] = remoteId; + } + + if (type_ != null) { + _queryParams["type"] = type_; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? 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, + "knowledgebase/v1/containers", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedContainerList.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 /knowledgebase/v1/containers."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns a `Container` object with the given `id`. + * + * @param {string} id + * @param {Merge.knowledgebase.ContainersRetrieveRequest} request + * @param {Containers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.containers.retrieve("id") + */ + public retrieve( + id: string, + request: Merge.knowledgebase.ContainersRetrieveRequest = {}, + requestOptions?: Containers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.knowledgebase.ContainersRetrieveRequest = {}, + requestOptions?: Containers.RequestOptions, + ): Promise> { + const { expand, includeRemoteData, includeShellData } = request; + const _queryParams: Record = {}; + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.ContainersRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/containers/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.Container.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 /knowledgebase/v1/containers/{id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/containers/client/index.ts b/src/api/resources/knowledgebase/resources/containers/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersListRequest.ts b/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersListRequest.ts new file mode 100644 index 000000000..01d909e39 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersListRequest.ts @@ -0,0 +1,42 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface ContainersListRequest { + /** If provided, will only return objects created after this datetime. */ + createdAfter?: Date; + /** If provided, will only return objects created before this datetime. */ + createdBefore?: Date; + /** The pagination cursor value. */ + cursor?: string; + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.ContainersListRequestExpand; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + includeDeletedData?: boolean; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; + /** If provided, only objects synced by Merge after this date time will be returned. */ + modifiedAfter?: Date; + /** If provided, only objects synced by Merge before this date time will be returned. */ + modifiedBefore?: Date; + /** Number of results to return per page. */ + pageSize?: number; + /** If provided, will only return sub containers of the parent_article_id. */ + parentArticleId?: string; + /** If provided, will only return sub containers of the parent_container_id. */ + parentContainerId?: string; + /** The API provider's ID for the given object. */ + remoteId?: string; + /** If provided, will only return containers of the given type. */ + type?: string; +} diff --git a/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersRetrieveRequest.ts new file mode 100644 index 000000000..ba1e1c3dd --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/client/requests/ContainersRetrieveRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * {} + */ +export interface ContainersRetrieveRequest { + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.ContainersRetrieveRequestExpand; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/containers/client/requests/index.ts b/src/api/resources/knowledgebase/resources/containers/client/requests/index.ts new file mode 100644 index 000000000..6b2535225 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type ContainersListRequest } from "./ContainersListRequest"; +export { type ContainersRetrieveRequest } from "./ContainersRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/containers/index.ts b/src/api/resources/knowledgebase/resources/containers/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts b/src/api/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts new file mode 100644 index 000000000..9f5dd42b4 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ContainersListRequestExpand = + | "parent_article" + | "parent_article,parent_container" + | "parent_container" + | "permissions" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_container"; +export const ContainersListRequestExpand = { + ParentArticle: "parent_article", + ParentArticleParentContainer: "parent_article,parent_container", + ParentContainer: "parent_container", + Permissions: "permissions", + PermissionsParentArticle: "permissions,parent_article", + PermissionsParentArticleParentContainer: "permissions,parent_article,parent_container", + PermissionsParentContainer: "permissions,parent_container", +} as const; diff --git a/src/api/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts b/src/api/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts new file mode 100644 index 000000000..ee4abf0b9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type ContainersRetrieveRequestExpand = + | "parent_article" + | "parent_article,parent_container" + | "parent_container" + | "permissions" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_container"; +export const ContainersRetrieveRequestExpand = { + ParentArticle: "parent_article", + ParentArticleParentContainer: "parent_article,parent_container", + ParentContainer: "parent_container", + Permissions: "permissions", + PermissionsParentArticle: "permissions,parent_article", + PermissionsParentArticleParentContainer: "permissions,parent_article,parent_container", + PermissionsParentContainer: "permissions,parent_container", +} as const; diff --git a/src/api/resources/knowledgebase/resources/containers/types/index.ts b/src/api/resources/knowledgebase/resources/containers/types/index.ts new file mode 100644 index 000000000..4a151c0c4 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/containers/types/index.ts @@ -0,0 +1,2 @@ +export * from "./ContainersListRequestExpand"; +export * from "./ContainersRetrieveRequestExpand"; diff --git a/src/api/resources/knowledgebase/resources/deleteAccount/client/Client.ts b/src/api/resources/knowledgebase/resources/deleteAccount/client/Client.ts new file mode 100644 index 000000000..184d5aa14 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/deleteAccount/client/Client.ts @@ -0,0 +1,115 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace DeleteAccount { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class DeleteAccount { + protected readonly _options: DeleteAccount.Options; + + constructor(_options: DeleteAccount.Options) { + this._options = _options; + } + + /** + * Delete a linked account. + * + * @param {DeleteAccount.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.deleteAccount.delete() + */ + public delete(requestOptions?: DeleteAccount.RequestOptions): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__delete(requestOptions)); + } + + private async __delete(requestOptions?: DeleteAccount.RequestOptions): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/delete-account", + ), + method: "POST", + headers: _headers, + queryParameters: requestOptions?.queryParams, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { data: undefined, 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 POST /knowledgebase/v1/delete-account.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/deleteAccount/client/index.ts b/src/api/resources/knowledgebase/resources/deleteAccount/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/deleteAccount/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/deleteAccount/index.ts b/src/api/resources/knowledgebase/resources/deleteAccount/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/deleteAccount/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/Client.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/Client.ts new file mode 100644 index 000000000..18e77fbbf --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/Client.ts @@ -0,0 +1,584 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace FieldMapping { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class FieldMapping { + protected readonly _options: FieldMapping.Options; + + constructor(_options: FieldMapping.Options) { + this._options = _options; + } + + /** + * 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/). + * + * @param {Merge.knowledgebase.FieldMappingsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.fieldMapping.fieldMappingsRetrieve() + */ + public fieldMappingsRetrieve( + request: Merge.knowledgebase.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsRetrieve(request, requestOptions)); + } + + private async __fieldMappingsRetrieve( + request: Merge.knowledgebase.FieldMappingsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + const { excludeRemoteFieldMetadata } = request; + const _queryParams: Record = {}; + if (excludeRemoteFieldMetadata != null) { + _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/field-mappings", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.FieldMappingApiInstanceResponse.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 /knowledgebase/v1/field-mappings.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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. + * + * @param {Merge.knowledgebase.CreateFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.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" + * }) + */ + public fieldMappingsCreate( + request: Merge.knowledgebase.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsCreate(request, requestOptions)); + } + + private async __fieldMappingsCreate( + request: Merge.knowledgebase.CreateFieldMappingRequest, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + const { excludeRemoteFieldMetadata, ..._body } = request; + const _queryParams: Record = {}; + if (excludeRemoteFieldMetadata != null) { + _queryParams["exclude_remote_field_metadata"] = excludeRemoteFieldMetadata.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/field-mappings", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + requestType: "json", + body: serializers.knowledgebase.CreateFieldMappingRequest.jsonOrThrow(_body, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.FieldMappingInstanceResponse.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 POST /knowledgebase/v1/field-mappings.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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. + * + * @param {string} fieldMappingId + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.fieldMapping.fieldMappingsDestroy("field_mapping_id") + */ + public fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__fieldMappingsDestroy(fieldMappingId, requestOptions)); + } + + private async __fieldMappingsDestroy( + fieldMappingId: string, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, + ), + method: "DELETE", + 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.knowledgebase.FieldMappingInstanceResponse.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 DELETE /knowledgebase/v1/field-mappings/{field_mapping_id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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. + * + * @param {string} fieldMappingId + * @param {Merge.knowledgebase.PatchedEditFieldMappingRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id") + */ + public fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.knowledgebase.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise( + this.__fieldMappingsPartialUpdate(fieldMappingId, request, requestOptions), + ); + } + + private async __fieldMappingsPartialUpdate( + fieldMappingId: string, + request: Merge.knowledgebase.PatchedEditFieldMappingRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/field-mappings/${encodeURIComponent(fieldMappingId)}`, + ), + method: "PATCH", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.PatchedEditFieldMappingRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.FieldMappingInstanceResponse.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 /knowledgebase/v1/field-mappings/{field_mapping_id}.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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/). + * + * @param {Merge.knowledgebase.RemoteFieldsRetrieveRequest} request + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.fieldMapping.remoteFieldsRetrieve() + */ + public remoteFieldsRetrieve( + request: Merge.knowledgebase.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__remoteFieldsRetrieve(request, requestOptions)); + } + + private async __remoteFieldsRetrieve( + request: Merge.knowledgebase.RemoteFieldsRetrieveRequest = {}, + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + const { commonModels, includeExampleValues } = request; + const _queryParams: Record = {}; + if (commonModels != null) { + _queryParams["common_models"] = commonModels; + } + + if (includeExampleValues != null) { + _queryParams["include_example_values"] = includeExampleValues; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/remote-fields", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.RemoteFieldApiResponse.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 /knowledgebase/v1/remote-fields.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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/). + * + * @param {FieldMapping.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.fieldMapping.targetFieldsRetrieve() + */ + public targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__targetFieldsRetrieve(requestOptions)); + } + + private async __targetFieldsRetrieve( + requestOptions?: FieldMapping.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/target-fields", + ), + 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.knowledgebase.ExternalTargetFieldApiResponse.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 /knowledgebase/v1/target-fields.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/index.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts new file mode 100644 index 000000000..f6e3c047a --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * 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" + * } + */ +export interface CreateFieldMappingRequest { + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ + excludeRemoteFieldMetadata?: boolean; + /** The name of the target field you want this remote field to map to. */ + targetFieldName: string; + /** The description of the target field you want this remote field to map to. */ + targetFieldDescription: string; + /** The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. */ + remoteFieldTraversalPath: unknown[]; + /** The method of the remote endpoint where the remote field is coming from. */ + remoteMethod: string; + /** The path of the remote endpoint where the remote field is coming from. */ + remoteUrlPath: string; + /** The name of the Common Model that the remote field corresponds to in a given category. */ + commonModelName: string; + /** JMES path to specify json query expression to be used on field mapping. */ + jmesPath?: string; +} diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts new file mode 100644 index 000000000..75ab57f7d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/FieldMappingsRetrieveRequest.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface FieldMappingsRetrieveRequest { + /** If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. */ + excludeRemoteFieldMetadata?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts new file mode 100644 index 000000000..8c5124a16 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface PatchedEditFieldMappingRequest { + /** The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. */ + remoteFieldTraversalPath?: unknown[]; + /** The method of the remote endpoint where the remote field is coming from. */ + remoteMethod?: string; + /** The path of the remote endpoint where the remote field is coming from. */ + remoteUrlPath?: string; + /** JMES path to specify json query expression to be used on field mapping. */ + jmesPath?: string; +} diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts new file mode 100644 index 000000000..78cd89f35 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/RemoteFieldsRetrieveRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface RemoteFieldsRetrieveRequest { + /** A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. */ + commonModels?: string; + /** If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. */ + includeExampleValues?: string; +} diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts new file mode 100644 index 000000000..5cc5b6db1 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts @@ -0,0 +1,4 @@ +export { type FieldMappingsRetrieveRequest } from "./FieldMappingsRetrieveRequest"; +export { type CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { type PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; +export { type RemoteFieldsRetrieveRequest } from "./RemoteFieldsRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/fieldMapping/index.ts b/src/api/resources/knowledgebase/resources/fieldMapping/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/fieldMapping/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/forceResync/client/Client.ts b/src/api/resources/knowledgebase/resources/forceResync/client/Client.ts new file mode 100644 index 000000000..95851115b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/forceResync/client/Client.ts @@ -0,0 +1,133 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace ForceResync { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class ForceResync { + protected readonly _options: ForceResync.Options; + + constructor(_options: ForceResync.Options) { + this._options = _options; + } + + /** + * 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. + * + * @param {ForceResync.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.forceResync.syncStatusResyncCreate() + */ + public syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__syncStatusResyncCreate(requestOptions)); + } + + private async __syncStatusResyncCreate( + requestOptions?: ForceResync.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/sync-status/resync", + ), + method: "POST", + 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.knowledgebase.forceResync.syncStatusResyncCreate.Response.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 POST /knowledgebase/v1/sync-status/resync.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/forceResync/client/index.ts b/src/api/resources/knowledgebase/resources/forceResync/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/forceResync/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/forceResync/index.ts b/src/api/resources/knowledgebase/resources/forceResync/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/forceResync/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/generateKey/client/Client.ts b/src/api/resources/knowledgebase/resources/generateKey/client/Client.ts new file mode 100644 index 000000000..fe583b9da --- /dev/null +++ b/src/api/resources/knowledgebase/resources/generateKey/client/Client.ts @@ -0,0 +1,140 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace GenerateKey { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class GenerateKey { + protected readonly _options: GenerateKey.Options; + + constructor(_options: GenerateKey.Options) { + this._options = _options; + } + + /** + * Create a remote key. + * + * @param {Merge.knowledgebase.GenerateRemoteKeyRequest} request + * @param {GenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.generateKey.create({ + * name: "Remote Deployment Key 1" + * }) + */ + public create( + request: Merge.knowledgebase.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.GenerateRemoteKeyRequest, + requestOptions?: GenerateKey.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/generate-key", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.GenerateRemoteKeyRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.RemoteKey.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 POST /knowledgebase/v1/generate-key.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/generateKey/client/index.ts b/src/api/resources/knowledgebase/resources/generateKey/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/generateKey/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/api/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts new file mode 100644 index 000000000..2b557a9a9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * name: "Remote Deployment Key 1" + * } + */ +export interface GenerateRemoteKeyRequest { + /** The name of the remote key */ + name: string; +} diff --git a/src/api/resources/knowledgebase/resources/generateKey/client/requests/index.ts b/src/api/resources/knowledgebase/resources/generateKey/client/requests/index.ts new file mode 100644 index 000000000..d8255223c --- /dev/null +++ b/src/api/resources/knowledgebase/resources/generateKey/client/requests/index.ts @@ -0,0 +1 @@ +export { type GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/api/resources/knowledgebase/resources/generateKey/index.ts b/src/api/resources/knowledgebase/resources/generateKey/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/generateKey/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/groups/client/Client.ts b/src/api/resources/knowledgebase/resources/groups/client/Client.ts new file mode 100644 index 000000000..454e50cbf --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/client/Client.ts @@ -0,0 +1,292 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Groups { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Groups { + protected readonly _options: Groups.Options; + + constructor(_options: Groups.Options) { + this._options = _options; + } + + /** + * Returns a list of `Group` objects. + * + * @param {Merge.knowledgebase.GroupsListRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.groups.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.GroupsListRequest = {}, + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.GroupsListRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { + const { + createdAfter, + createdBefore, + cursor, + expand, + includeDeletedData, + includeRemoteData, + includeShellData, + modifiedAfter, + modifiedBefore, + pageSize, + remoteId, + } = request; + const _queryParams: Record = {}; + if (createdAfter != null) { + _queryParams["created_after"] = createdAfter.toISOString(); + } + + if (createdBefore != null) { + _queryParams["created_before"] = createdBefore.toISOString(); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.GroupsListRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeDeletedData != null) { + _queryParams["include_deleted_data"] = includeDeletedData.toString(); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + if (modifiedAfter != null) { + _queryParams["modified_after"] = modifiedAfter.toISOString(); + } + + if (modifiedBefore != null) { + _queryParams["modified_before"] = modifiedBefore.toISOString(); + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (remoteId != null) { + _queryParams["remote_id"] = remoteId; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/groups", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedGroupList.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 /knowledgebase/v1/groups."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns a `Group` object with the given `id`. + * + * @param {string} id + * @param {Merge.knowledgebase.GroupsRetrieveRequest} request + * @param {Groups.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.groups.retrieve("id") + */ + public retrieve( + id: string, + request: Merge.knowledgebase.GroupsRetrieveRequest = {}, + requestOptions?: Groups.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.knowledgebase.GroupsRetrieveRequest = {}, + requestOptions?: Groups.RequestOptions, + ): Promise> { + const { expand, includeRemoteData, includeShellData } = request; + const _queryParams: Record = {}; + if (expand != null) { + _queryParams["expand"] = serializers.knowledgebase.GroupsRetrieveRequestExpand.jsonOrThrow(expand, { + unrecognizedObjectKeys: "strip", + }); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/groups/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.Group.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 /knowledgebase/v1/groups/{id}."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/groups/client/index.ts b/src/api/resources/knowledgebase/resources/groups/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsListRequest.ts b/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsListRequest.ts new file mode 100644 index 000000000..2d4e874a9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsListRequest.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface GroupsListRequest { + /** If provided, will only return objects created after this datetime. */ + createdAfter?: Date; + /** If provided, will only return objects created before this datetime. */ + createdBefore?: Date; + /** The pagination cursor value. */ + cursor?: string; + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.GroupsListRequestExpand; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + includeDeletedData?: boolean; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; + /** If provided, only objects synced by Merge after this date time will be returned. */ + modifiedAfter?: Date; + /** If provided, only objects synced by Merge before this date time will be returned. */ + modifiedBefore?: Date; + /** Number of results to return per page. */ + pageSize?: number; + /** The API provider's ID for the given object. */ + remoteId?: string; +} diff --git a/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsRetrieveRequest.ts new file mode 100644 index 000000000..b8e27ebd4 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/client/requests/GroupsRetrieveRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * {} + */ +export interface GroupsRetrieveRequest { + /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ + expand?: Merge.knowledgebase.GroupsRetrieveRequestExpand; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/groups/client/requests/index.ts b/src/api/resources/knowledgebase/resources/groups/client/requests/index.ts new file mode 100644 index 000000000..7456e43a9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type GroupsListRequest } from "./GroupsListRequest"; +export { type GroupsRetrieveRequest } from "./GroupsRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/groups/index.ts b/src/api/resources/knowledgebase/resources/groups/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts b/src/api/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts new file mode 100644 index 000000000..ca34b919f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GroupsListRequestExpand = "parent_group" | "users" | "users,parent_group"; +export const GroupsListRequestExpand = { + ParentGroup: "parent_group", + Users: "users", + UsersParentGroup: "users,parent_group", +} as const; diff --git a/src/api/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts b/src/api/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts new file mode 100644 index 000000000..b30f471e8 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type GroupsRetrieveRequestExpand = "parent_group" | "users" | "users,parent_group"; +export const GroupsRetrieveRequestExpand = { + ParentGroup: "parent_group", + Users: "users", + UsersParentGroup: "users,parent_group", +} as const; diff --git a/src/api/resources/knowledgebase/resources/groups/types/index.ts b/src/api/resources/knowledgebase/resources/groups/types/index.ts new file mode 100644 index 000000000..a3d3be2ea --- /dev/null +++ b/src/api/resources/knowledgebase/resources/groups/types/index.ts @@ -0,0 +1,2 @@ +export * from "./GroupsListRequestExpand"; +export * from "./GroupsRetrieveRequestExpand"; diff --git a/src/api/resources/knowledgebase/resources/index.ts b/src/api/resources/knowledgebase/resources/index.ts new file mode 100644 index 000000000..17249ae6d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/index.ts @@ -0,0 +1,44 @@ +export * as articles from "./articles"; +export * from "./articles/types"; +export * as asyncPassthrough from "./asyncPassthrough"; +export * from "./asyncPassthrough/types"; +export * as containers from "./containers"; +export * from "./containers/types"; +export * as groups from "./groups"; +export * from "./groups/types"; +export * as issues from "./issues"; +export * from "./issues/types"; +export * as linkToken from "./linkToken"; +export * from "./linkToken/types"; +export * as linkedAccounts from "./linkedAccounts"; +export * from "./linkedAccounts/types"; +export * as accountDetails from "./accountDetails"; +export * as accountToken from "./accountToken"; +export * as attachments from "./attachments"; +export * as auditTrail from "./auditTrail"; +export * as availableActions from "./availableActions"; +export * as scopes from "./scopes"; +export * as deleteAccount from "./deleteAccount"; +export * as fieldMapping from "./fieldMapping"; +export * as generateKey from "./generateKey"; +export * as passthrough from "./passthrough"; +export * as regenerateKey from "./regenerateKey"; +export * as syncStatus from "./syncStatus"; +export * as forceResync from "./forceResync"; +export * as users from "./users"; +export * as webhookReceivers from "./webhookReceivers"; +export * from "./articles/client/requests"; +export * from "./attachments/client/requests"; +export * from "./auditTrail/client/requests"; +export * from "./containers/client/requests"; +export * from "./scopes/client/requests"; +export * from "./fieldMapping/client/requests"; +export * from "./generateKey/client/requests"; +export * from "./groups/client/requests"; +export * from "./issues/client/requests"; +export * from "./linkToken/client/requests"; +export * from "./linkedAccounts/client/requests"; +export * from "./regenerateKey/client/requests"; +export * from "./syncStatus/client/requests"; +export * from "./users/client/requests"; +export * from "./webhookReceivers/client/requests"; diff --git a/src/api/resources/knowledgebase/resources/issues/client/Client.ts b/src/api/resources/knowledgebase/resources/issues/client/Client.ts new file mode 100644 index 000000000..9fdd08713 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/client/Client.ts @@ -0,0 +1,288 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Issues { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Issues { + protected readonly _options: Issues.Options; + + constructor(_options: Issues.Options) { + this._options = _options; + } + + /** + * Gets all issues for Organization. + * + * @param {Merge.knowledgebase.IssuesListRequest} request + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.issues.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.IssuesListRequest = {}, + requestOptions?: Issues.RequestOptions, + ): Promise> { + const { + accountToken, + cursor, + endDate, + endUserOrganizationName, + firstIncidentTimeAfter, + firstIncidentTimeBefore, + includeMuted, + integrationName, + lastIncidentTimeAfter, + lastIncidentTimeBefore, + linkedAccountId, + pageSize, + startDate, + status, + } = request; + const _queryParams: Record = {}; + if (accountToken != null) { + _queryParams["account_token"] = accountToken; + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (endDate != null) { + _queryParams["end_date"] = endDate; + } + + if (endUserOrganizationName != null) { + _queryParams["end_user_organization_name"] = endUserOrganizationName; + } + + if (firstIncidentTimeAfter != null) { + _queryParams["first_incident_time_after"] = firstIncidentTimeAfter.toISOString(); + } + + if (firstIncidentTimeBefore != null) { + _queryParams["first_incident_time_before"] = firstIncidentTimeBefore.toISOString(); + } + + if (includeMuted != null) { + _queryParams["include_muted"] = includeMuted; + } + + if (integrationName != null) { + _queryParams["integration_name"] = integrationName; + } + + if (lastIncidentTimeAfter != null) { + _queryParams["last_incident_time_after"] = lastIncidentTimeAfter.toISOString(); + } + + if (lastIncidentTimeBefore != null) { + _queryParams["last_incident_time_before"] = lastIncidentTimeBefore.toISOString(); + } + + if (linkedAccountId != null) { + _queryParams["linked_account_id"] = linkedAccountId; + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (startDate != null) { + _queryParams["start_date"] = startDate; + } + + if (status != null) { + _queryParams["status"] = serializers.knowledgebase.IssuesListRequestStatus.jsonOrThrow(status, { + unrecognizedObjectKeys: "strip", + }); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? 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, + "knowledgebase/v1/issues", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedIssueList.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 /knowledgebase/v1/issues."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Get a specific issue. + * + * @param {string} id + * @param {Issues.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.issues.retrieve("id") + */ + public retrieve( + id: string, + requestOptions?: Issues.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, requestOptions)); + } + + private async __retrieve( + id: string, + requestOptions?: Issues.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/issues/${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.knowledgebase.Issue.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 /knowledgebase/v1/issues/{id}."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/issues/client/index.ts b/src/api/resources/knowledgebase/resources/issues/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/issues/client/requests/IssuesListRequest.ts b/src/api/resources/knowledgebase/resources/issues/client/requests/IssuesListRequest.ts new file mode 100644 index 000000000..7070718b9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/client/requests/IssuesListRequest.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface IssuesListRequest { + accountToken?: string; + /** The pagination cursor value. */ + cursor?: string; + /** If included, will only include issues whose most recent action occurred before this time */ + endDate?: string; + endUserOrganizationName?: string; + /** If provided, will only return issues whose first incident time was after this datetime. */ + firstIncidentTimeAfter?: Date; + /** If provided, will only return issues whose first incident time was before this datetime. */ + firstIncidentTimeBefore?: Date; + /** If true, will include muted issues */ + includeMuted?: string; + integrationName?: string; + /** If provided, will only return issues whose last incident time was after this datetime. */ + lastIncidentTimeAfter?: Date; + /** If provided, will only return issues whose last incident time was before this datetime. */ + lastIncidentTimeBefore?: Date; + /** If provided, will only include issues pertaining to the linked account passed in. */ + linkedAccountId?: string; + /** Number of results to return per page. */ + pageSize?: number; + /** If included, will only include issues whose most recent action occurred after this time */ + startDate?: string; + /** + * Status of the issue. Options: ('ONGOING', 'RESOLVED') + * + * * `ONGOING` - ONGOING + * * `RESOLVED` - RESOLVED + */ + status?: Merge.knowledgebase.IssuesListRequestStatus; +} diff --git a/src/api/resources/knowledgebase/resources/issues/client/requests/index.ts b/src/api/resources/knowledgebase/resources/issues/client/requests/index.ts new file mode 100644 index 000000000..ad215d907 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/client/requests/index.ts @@ -0,0 +1 @@ +export { type IssuesListRequest } from "./IssuesListRequest"; diff --git a/src/api/resources/knowledgebase/resources/issues/index.ts b/src/api/resources/knowledgebase/resources/issues/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts b/src/api/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts new file mode 100644 index 000000000..a35e3e193 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type IssuesListRequestStatus = "ONGOING" | "RESOLVED"; +export const IssuesListRequestStatus = { + Ongoing: "ONGOING", + Resolved: "RESOLVED", +} as const; diff --git a/src/api/resources/knowledgebase/resources/issues/types/index.ts b/src/api/resources/knowledgebase/resources/issues/types/index.ts new file mode 100644 index 000000000..554cdf48c --- /dev/null +++ b/src/api/resources/knowledgebase/resources/issues/types/index.ts @@ -0,0 +1 @@ +export * from "./IssuesListRequestStatus"; diff --git a/src/api/resources/knowledgebase/resources/linkToken/client/Client.ts b/src/api/resources/knowledgebase/resources/linkToken/client/Client.ts new file mode 100644 index 000000000..d051fd821 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/client/Client.ts @@ -0,0 +1,141 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace LinkToken { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class LinkToken { + protected readonly _options: LinkToken.Options; + + constructor(_options: LinkToken.Options) { + this._options = _options; + } + + /** + * Creates a link token to be used when linking a new end user. + * + * @param {Merge.knowledgebase.EndUserDetailsRequest} request + * @param {LinkToken.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.linkToken.create({ + * endUserEmailAddress: "example@gmail.com", + * endUserOrganizationName: "Test Organization", + * endUserOriginId: "12345", + * categories: ["hris", "ats"] + * }) + */ + public create( + request: Merge.knowledgebase.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.EndUserDetailsRequest, + requestOptions?: LinkToken.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/link-token", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.EndUserDetailsRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.LinkToken.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 POST /knowledgebase/v1/link-token."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/linkToken/client/index.ts b/src/api/resources/knowledgebase/resources/linkToken/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/api/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts new file mode 100644 index 000000000..0d51658a5 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * endUserEmailAddress: "example@gmail.com", + * endUserOrganizationName: "Test Organization", + * endUserOriginId: "12345", + * categories: ["hris", "ats"] + * } + */ +export interface EndUserDetailsRequest { + /** Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. */ + endUserEmailAddress: string; + /** Your end user's organization. */ + endUserOrganizationName: string; + /** This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. */ + endUserOriginId: string; + /** The integration categories to show in Merge Link. */ + categories: Merge.knowledgebase.CategoriesEnum[]; + /** The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. */ + integration?: string; + /** An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. */ + linkExpiryMins?: number; + /** Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. */ + shouldCreateMagicLinkUrl?: boolean; + /** Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. */ + hideAdminMagicLink?: boolean; + /** An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. */ + commonModels?: Merge.knowledgebase.CommonModelScopesBodyRequest[]; + /** When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. */ + categoryCommonModelScopes?: Record< + string, + Merge.knowledgebase.IndividualCommonModelScopeDeserializerRequest[] | undefined + >; + /** + * The following subset of IETF language tags can be used to configure localization. + * + * * `en` - en + * * `de` - de + */ + language?: Merge.knowledgebase.EndUserDetailsRequestLanguage; + /** The boolean that indicates whether initial, periodic, and force syncs will be disabled. */ + areSyncsDisabled?: boolean; + /** A JSON object containing integration-specific configuration options. */ + integrationSpecificConfig?: Record; +} diff --git a/src/api/resources/knowledgebase/resources/linkToken/client/requests/index.ts b/src/api/resources/knowledgebase/resources/linkToken/client/requests/index.ts new file mode 100644 index 000000000..de1b7e67d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/client/requests/index.ts @@ -0,0 +1 @@ +export { type EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/api/resources/knowledgebase/resources/linkToken/index.ts b/src/api/resources/knowledgebase/resources/linkToken/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.ts b/src/api/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.ts new file mode 100644 index 000000000..a99c07540 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../index"; + +/** + * The following subset of IETF language tags can be used to configure localization. + * + * * `en` - en + * * `de` - de + */ +export type EndUserDetailsRequestLanguage = Merge.knowledgebase.LanguageEnum | string; diff --git a/src/api/resources/knowledgebase/resources/linkToken/types/index.ts b/src/api/resources/knowledgebase/resources/linkToken/types/index.ts new file mode 100644 index 000000000..c90e13c37 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkToken/types/index.ts @@ -0,0 +1 @@ +export * from "./EndUserDetailsRequestLanguage"; diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/client/Client.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/client/Client.ts new file mode 100644 index 000000000..60d63f06d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/client/Client.ts @@ -0,0 +1,206 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import * as serializers from "../../../../../../serialization/index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace LinkedAccounts { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class LinkedAccounts { + protected readonly _options: LinkedAccounts.Options; + + constructor(_options: LinkedAccounts.Options) { + this._options = _options; + } + + /** + * List linked accounts for your organization. + * + * @param {Merge.knowledgebase.LinkedAccountsListRequest} request + * @param {LinkedAccounts.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.linkedAccounts.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.LinkedAccountsListRequest = {}, + requestOptions?: LinkedAccounts.RequestOptions, + ): Promise> { + const { + category, + cursor, + endUserEmailAddress, + endUserOrganizationName, + endUserOriginId, + endUserOriginIds, + id, + ids, + includeDuplicates, + integrationName, + isTestAccount, + pageSize, + status, + } = request; + const _queryParams: Record = {}; + if (category != null) { + _queryParams["category"] = serializers.knowledgebase.LinkedAccountsListRequestCategory.jsonOrThrow( + category, + { unrecognizedObjectKeys: "strip" }, + ); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (endUserEmailAddress != null) { + _queryParams["end_user_email_address"] = endUserEmailAddress; + } + + if (endUserOrganizationName != null) { + _queryParams["end_user_organization_name"] = endUserOrganizationName; + } + + if (endUserOriginId != null) { + _queryParams["end_user_origin_id"] = endUserOriginId; + } + + if (endUserOriginIds != null) { + _queryParams["end_user_origin_ids"] = endUserOriginIds; + } + + if (id != null) { + _queryParams["id"] = id; + } + + if (ids != null) { + _queryParams["ids"] = ids; + } + + if (includeDuplicates != null) { + _queryParams["include_duplicates"] = includeDuplicates.toString(); + } + + if (integrationName != null) { + _queryParams["integration_name"] = integrationName; + } + + if (isTestAccount != null) { + _queryParams["is_test_account"] = isTestAccount; + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (status != null) { + _queryParams["status"] = status; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/linked-accounts", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedAccountDetailsAndActionsList.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 /knowledgebase/v1/linked-accounts.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/client/index.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts new file mode 100644 index 000000000..b8dfeb2fe --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/LinkedAccountsListRequest.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface LinkedAccountsListRequest { + /** + * Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `knowledgebase`, `mktg`, `ticketing` + * + * * `hris` - hris + * * `ats` - ats + * * `accounting` - accounting + * * `ticketing` - ticketing + * * `crm` - crm + * * `mktg` - mktg + * * `filestorage` - filestorage + * * `knowledgebase` - knowledgebase + */ + category?: Merge.knowledgebase.LinkedAccountsListRequestCategory; + /** The pagination cursor value. */ + cursor?: string; + /** If provided, will only return linked accounts associated with the given email address. */ + endUserEmailAddress?: string; + /** If provided, will only return linked accounts associated with the given organization name. */ + endUserOrganizationName?: string; + /** If provided, will only return linked accounts associated with the given origin ID. */ + endUserOriginId?: string; + /** Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. */ + endUserOriginIds?: string; + id?: string; + /** Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. */ + ids?: string; + /** If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. */ + includeDuplicates?: boolean; + /** If provided, will only return linked accounts associated with the given integration name. */ + integrationName?: string; + /** If included, will only include test linked accounts. If not included, will only include non-test linked accounts. */ + isTestAccount?: string; + /** Number of results to return per page. */ + pageSize?: number; + /** Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` */ + status?: string; +} diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/index.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/index.ts new file mode 100644 index 000000000..d28d7a17d --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/client/requests/index.ts @@ -0,0 +1 @@ +export { type LinkedAccountsListRequest } from "./LinkedAccountsListRequest"; diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/index.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts new file mode 100644 index 000000000..08540fb99 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LinkedAccountsListRequestCategory = + | "accounting" + | "ats" + | "crm" + | "filestorage" + | "hris" + | "knowledgebase" + | "mktg" + | "ticketing"; +export const LinkedAccountsListRequestCategory = { + Accounting: "accounting", + Ats: "ats", + Crm: "crm", + Filestorage: "filestorage", + Hris: "hris", + Knowledgebase: "knowledgebase", + Mktg: "mktg", + Ticketing: "ticketing", +} as const; diff --git a/src/api/resources/knowledgebase/resources/linkedAccounts/types/index.ts b/src/api/resources/knowledgebase/resources/linkedAccounts/types/index.ts new file mode 100644 index 000000000..91de6010a --- /dev/null +++ b/src/api/resources/knowledgebase/resources/linkedAccounts/types/index.ts @@ -0,0 +1 @@ +export * from "./LinkedAccountsListRequestCategory"; diff --git a/src/api/resources/knowledgebase/resources/passthrough/client/Client.ts b/src/api/resources/knowledgebase/resources/passthrough/client/Client.ts new file mode 100644 index 000000000..0821980e5 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/passthrough/client/Client.ts @@ -0,0 +1,139 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Passthrough { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Passthrough { + protected readonly _options: Passthrough.Options; + + constructor(_options: Passthrough.Options) { + this._options = _options; + } + + /** + * Pull data from an endpoint not currently supported by Merge. + * + * @param {Merge.knowledgebase.DataPassthroughRequest} request + * @param {Passthrough.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.passthrough.create({ + * method: "GET", + * path: "/scooters" + * }) + */ + public create( + request: Merge.knowledgebase.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.DataPassthroughRequest, + requestOptions?: Passthrough.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/passthrough", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.DataPassthroughRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.RemoteResponse.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 POST /knowledgebase/v1/passthrough."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/passthrough/client/index.ts b/src/api/resources/knowledgebase/resources/passthrough/client/index.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/passthrough/client/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/api/resources/knowledgebase/resources/passthrough/index.ts b/src/api/resources/knowledgebase/resources/passthrough/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/passthrough/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/regenerateKey/client/Client.ts b/src/api/resources/knowledgebase/resources/regenerateKey/client/Client.ts new file mode 100644 index 000000000..16bbe9d49 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/regenerateKey/client/Client.ts @@ -0,0 +1,140 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace RegenerateKey { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class RegenerateKey { + protected readonly _options: RegenerateKey.Options; + + constructor(_options: RegenerateKey.Options) { + this._options = _options; + } + + /** + * Exchange remote keys. + * + * @param {Merge.knowledgebase.RemoteKeyForRegenerationRequest} request + * @param {RegenerateKey.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.regenerateKey.create({ + * name: "Remote Deployment Key 1" + * }) + */ + public create( + request: Merge.knowledgebase.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.RemoteKeyForRegenerationRequest, + requestOptions?: RegenerateKey.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/regenerate-key", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.RemoteKeyForRegenerationRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.RemoteKey.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 POST /knowledgebase/v1/regenerate-key.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/regenerateKey/client/index.ts b/src/api/resources/knowledgebase/resources/regenerateKey/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/regenerateKey/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts new file mode 100644 index 000000000..9419e59a8 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * name: "Remote Deployment Key 1" + * } + */ +export interface RemoteKeyForRegenerationRequest { + /** The name of the remote key */ + name: string; +} diff --git a/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts b/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts new file mode 100644 index 000000000..09bb5dbd0 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts @@ -0,0 +1 @@ +export { type RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/api/resources/knowledgebase/resources/regenerateKey/index.ts b/src/api/resources/knowledgebase/resources/regenerateKey/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/regenerateKey/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/scopes/client/Client.ts b/src/api/resources/knowledgebase/resources/scopes/client/Client.ts new file mode 100644 index 000000000..afe7f2db9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/scopes/client/Client.ts @@ -0,0 +1,319 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Scopes { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Scopes { + protected readonly _options: Scopes.Options; + + constructor(_options: Scopes.Options) { + this._options = _options; + } + + /** + * 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). + * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.scopes.defaultScopesRetrieve() + */ + public defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__defaultScopesRetrieve(requestOptions)); + } + + private async __defaultScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/default-scopes", + ), + 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.knowledgebase.CommonModelScopeApi.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 /knowledgebase/v1/default-scopes.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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). + * + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.scopes.linkedAccountScopesRetrieve() + */ + public linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesRetrieve(requestOptions)); + } + + private async __linkedAccountScopesRetrieve( + requestOptions?: Scopes.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/linked-account-scopes", + ), + 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.knowledgebase.CommonModelScopeApi.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 /knowledgebase/v1/linked-account-scopes.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * 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) + * + * @param {Merge.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest} request + * @param {Scopes.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.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 + * } + * } + * }] + * }) + */ + public linkedAccountScopesCreate( + request: Merge.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__linkedAccountScopesCreate(request, requestOptions)); + } + + private async __linkedAccountScopesCreate( + request: Merge.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest, + requestOptions?: Scopes.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/linked-account-scopes", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.CommonModelScopeApi.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 POST /knowledgebase/v1/linked-account-scopes.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/scopes/client/index.ts b/src/api/resources/knowledgebase/resources/scopes/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/scopes/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/api/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts new file mode 100644 index 000000000..7c63c4fba --- /dev/null +++ b/src/api/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../../../../index"; + +/** + * @example + * { + * commonModels: [{ + * modelName: "Employee", + * modelPermissions: { + * "READ": { + * isEnabled: true + * }, + * "WRITE": { + * isEnabled: false + * } + * }, + * fieldPermissions: { + * enabledFields: ["avatar", "home_location"], + * disabledFields: ["work_location"] + * } + * }, { + * modelName: "Benefit", + * modelPermissions: { + * "WRITE": { + * isEnabled: false + * } + * } + * }] + * } + */ +export interface LinkedAccountCommonModelScopeDeserializerRequest { + /** The common models you want to update the scopes for */ + commonModels: Merge.knowledgebase.IndividualCommonModelScopeDeserializerRequest[]; +} diff --git a/src/api/resources/knowledgebase/resources/scopes/client/requests/index.ts b/src/api/resources/knowledgebase/resources/scopes/client/requests/index.ts new file mode 100644 index 000000000..d193f008e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/scopes/client/requests/index.ts @@ -0,0 +1 @@ +export { type LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/api/resources/knowledgebase/resources/scopes/index.ts b/src/api/resources/knowledgebase/resources/scopes/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/scopes/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/syncStatus/client/Client.ts b/src/api/resources/knowledgebase/resources/syncStatus/client/Client.ts new file mode 100644 index 000000000..9f31ef639 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/syncStatus/client/Client.ts @@ -0,0 +1,143 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace SyncStatus { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class SyncStatus { + protected readonly _options: SyncStatus.Options; + + constructor(_options: SyncStatus.Options) { + this._options = _options; + } + + /** + * 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). + * + * @param {Merge.knowledgebase.SyncStatusListRequest} request + * @param {SyncStatus.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.syncStatus.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.SyncStatusListRequest = {}, + requestOptions?: SyncStatus.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.SyncStatusListRequest = {}, + requestOptions?: SyncStatus.RequestOptions, + ): Promise> { + const { cursor, pageSize } = request; + const _queryParams: Record = {}; + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/sync-status", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedSyncStatusList.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 /knowledgebase/v1/sync-status."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/syncStatus/client/index.ts b/src/api/resources/knowledgebase/resources/syncStatus/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/syncStatus/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/syncStatus/client/requests/SyncStatusListRequest.ts b/src/api/resources/knowledgebase/resources/syncStatus/client/requests/SyncStatusListRequest.ts new file mode 100644 index 000000000..3fb47f9e4 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/syncStatus/client/requests/SyncStatusListRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface SyncStatusListRequest { + /** The pagination cursor value. */ + cursor?: string; + /** Number of results to return per page. */ + pageSize?: number; +} diff --git a/src/api/resources/knowledgebase/resources/syncStatus/client/requests/index.ts b/src/api/resources/knowledgebase/resources/syncStatus/client/requests/index.ts new file mode 100644 index 000000000..ef4f7c855 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/syncStatus/client/requests/index.ts @@ -0,0 +1 @@ +export { type SyncStatusListRequest } from "./SyncStatusListRequest"; diff --git a/src/api/resources/knowledgebase/resources/syncStatus/index.ts b/src/api/resources/knowledgebase/resources/syncStatus/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/syncStatus/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/users/client/Client.ts b/src/api/resources/knowledgebase/resources/users/client/Client.ts new file mode 100644 index 000000000..5f9bc03c9 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/client/Client.ts @@ -0,0 +1,279 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace Users { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class Users { + protected readonly _options: Users.Options; + + constructor(_options: Users.Options) { + this._options = _options; + } + + /** + * Returns a list of `User` objects. + * + * @param {Merge.knowledgebase.UsersListRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.users.list({ + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * }) + */ + public list( + request: Merge.knowledgebase.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions)); + } + + private async __list( + request: Merge.knowledgebase.UsersListRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { + const { + createdAfter, + createdBefore, + cursor, + includeDeletedData, + includeRemoteData, + includeShellData, + modifiedAfter, + modifiedBefore, + pageSize, + remoteId, + } = request; + const _queryParams: Record = {}; + if (createdAfter != null) { + _queryParams["created_after"] = createdAfter.toISOString(); + } + + if (createdBefore != null) { + _queryParams["created_before"] = createdBefore.toISOString(); + } + + if (cursor != null) { + _queryParams["cursor"] = cursor; + } + + if (includeDeletedData != null) { + _queryParams["include_deleted_data"] = includeDeletedData.toString(); + } + + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + if (modifiedAfter != null) { + _queryParams["modified_after"] = modifiedAfter.toISOString(); + } + + if (modifiedBefore != null) { + _queryParams["modified_before"] = modifiedBefore.toISOString(); + } + + if (pageSize != null) { + _queryParams["page_size"] = pageSize.toString(); + } + + if (remoteId != null) { + _queryParams["remote_id"] = remoteId; + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/users", + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.PaginatedUserList.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 /knowledgebase/v1/users."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Returns a `User` object with the given `id`. + * + * @param {string} id + * @param {Merge.knowledgebase.UsersRetrieveRequest} request + * @param {Users.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.users.retrieve("id") + */ + public retrieve( + id: string, + request: Merge.knowledgebase.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieve(id, request, requestOptions)); + } + + private async __retrieve( + id: string, + request: Merge.knowledgebase.UsersRetrieveRequest = {}, + requestOptions?: Users.RequestOptions, + ): Promise> { + const { includeRemoteData, includeShellData } = request; + const _queryParams: Record = {}; + if (includeRemoteData != null) { + _queryParams["include_remote_data"] = includeRemoteData.toString(); + } + + if (includeShellData != null) { + _queryParams["include_shell_data"] = includeShellData.toString(); + } + + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + `knowledgebase/v1/users/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: _headers, + queryParameters: { ..._queryParams, ...requestOptions?.queryParams }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.User.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 /knowledgebase/v1/users/{id}."); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/users/client/index.ts b/src/api/resources/knowledgebase/resources/users/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/users/client/requests/UsersListRequest.ts b/src/api/resources/knowledgebase/resources/users/client/requests/UsersListRequest.ts new file mode 100644 index 000000000..8117a6bbe --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/client/requests/UsersListRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + * } + */ +export interface UsersListRequest { + /** If provided, will only return objects created after this datetime. */ + createdAfter?: Date; + /** If provided, will only return objects created before this datetime. */ + createdBefore?: Date; + /** The pagination cursor value. */ + cursor?: string; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ + includeDeletedData?: boolean; + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; + /** If provided, only objects synced by Merge after this date time will be returned. */ + modifiedAfter?: Date; + /** If provided, only objects synced by Merge before this date time will be returned. */ + modifiedBefore?: Date; + /** Number of results to return per page. */ + pageSize?: number; + /** The API provider's ID for the given object. */ + remoteId?: string; +} diff --git a/src/api/resources/knowledgebase/resources/users/client/requests/UsersRetrieveRequest.ts b/src/api/resources/knowledgebase/resources/users/client/requests/UsersRetrieveRequest.ts new file mode 100644 index 000000000..40b24ee5b --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/client/requests/UsersRetrieveRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface UsersRetrieveRequest { + /** Whether to include the original data Merge fetched from the third-party to produce these models. */ + includeRemoteData?: boolean; + /** Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). */ + includeShellData?: boolean; +} diff --git a/src/api/resources/knowledgebase/resources/users/client/requests/index.ts b/src/api/resources/knowledgebase/resources/users/client/requests/index.ts new file mode 100644 index 000000000..7d1cf841a --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/client/requests/index.ts @@ -0,0 +1,2 @@ +export { type UsersListRequest } from "./UsersListRequest"; +export { type UsersRetrieveRequest } from "./UsersRetrieveRequest"; diff --git a/src/api/resources/knowledgebase/resources/users/index.ts b/src/api/resources/knowledgebase/resources/users/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/users/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/resources/webhookReceivers/client/Client.ts b/src/api/resources/knowledgebase/resources/webhookReceivers/client/Client.ts new file mode 100644 index 000000000..9c7e996ee --- /dev/null +++ b/src/api/resources/knowledgebase/resources/webhookReceivers/client/Client.ts @@ -0,0 +1,220 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../../../environments"; +import * as core from "../../../../../../core"; +import * as Merge from "../../../../../index"; +import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers"; +import * as serializers from "../../../../../../serialization/index"; +import * as errors from "../../../../../../errors/index"; + +export declare namespace WebhookReceivers { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey: core.Supplier; + /** Override the X-Account-Token header */ + accountToken?: core.Supplier; + /** Additional headers to include in requests. */ + headers?: Record | undefined>; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Override the X-Account-Token header */ + accountToken?: string | undefined; + /** Additional query string parameters to include in the request. */ + queryParams?: Record; + /** Additional headers to include in the request. */ + headers?: Record | undefined>; + } +} + +export class WebhookReceivers { + protected readonly _options: WebhookReceivers.Options; + + constructor(_options: WebhookReceivers.Options) { + this._options = _options; + } + + /** + * Returns a list of `WebhookReceiver` objects. + * + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.webhookReceivers.list() + */ + public list( + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__list(requestOptions)); + } + + private async __list( + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/webhook-receivers", + ), + 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.knowledgebase.webhookReceivers.list.Response.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 /knowledgebase/v1/webhook-receivers.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + /** + * Creates a `WebhookReceiver` object with the given values. + * + * @param {Merge.knowledgebase.WebhookReceiverRequest} request + * @param {WebhookReceivers.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.knowledgebase.webhookReceivers.create({ + * event: "event", + * isActive: true + * }) + */ + public create( + request: Merge.knowledgebase.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions)); + } + + private async __create( + request: Merge.knowledgebase.WebhookReceiverRequest, + requestOptions?: WebhookReceivers.RequestOptions, + ): Promise> { + let _headers: core.Fetcher.Args["headers"] = mergeHeaders( + this._options?.headers, + mergeOnlyDefinedHeaders({ + Authorization: await this._getAuthorizationHeader(), + "X-Account-Token": requestOptions?.accountToken ?? this._options?.accountToken, + }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.MergeEnvironment.Production, + "knowledgebase/v1/webhook-receivers", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryParameters: requestOptions?.queryParams, + requestType: "json", + body: serializers.knowledgebase.WebhookReceiverRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return { + data: serializers.knowledgebase.WebhookReceiver.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 POST /knowledgebase/v1/webhook-receivers.", + ); + case "unknown": + throw new errors.MergeError({ + message: _response.error.errorMessage, + rawResponse: _response.rawResponse, + }); + } + } + + protected async _getAuthorizationHeader(): Promise { + return `Bearer ${await core.Supplier.get(this._options.apiKey)}`; + } +} diff --git a/src/api/resources/knowledgebase/resources/webhookReceivers/client/index.ts b/src/api/resources/knowledgebase/resources/webhookReceivers/client/index.ts new file mode 100644 index 000000000..f33205a0f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/webhookReceivers/client/index.ts @@ -0,0 +1,2 @@ +export {}; +export * from "./requests"; diff --git a/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts new file mode 100644 index 000000000..88ba2513f --- /dev/null +++ b/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * event: "event", + * isActive: true + * } + */ +export interface WebhookReceiverRequest { + event: string; + isActive: boolean; + key?: string; +} diff --git a/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts b/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts new file mode 100644 index 000000000..1df76ea53 --- /dev/null +++ b/src/api/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts @@ -0,0 +1 @@ +export { type WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/api/resources/knowledgebase/resources/webhookReceivers/index.ts b/src/api/resources/knowledgebase/resources/webhookReceivers/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/api/resources/knowledgebase/resources/webhookReceivers/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/api/resources/knowledgebase/types/AccountDetails.ts b/src/api/resources/knowledgebase/types/AccountDetails.ts new file mode 100644 index 000000000..4e011c0b1 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetails.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface AccountDetails { + id?: string; + integration?: string; + integrationSlug?: string; + category?: Merge.knowledgebase.AccountDetailsCategory; + endUserOriginId?: string; + endUserOrganizationName?: string; + endUserEmailAddress?: string; + status?: string; + webhookListenerUrl?: string; + /** Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets. */ + isDuplicate?: boolean; + accountType?: string; + /** The time at which account completes the linking flow. */ + completedAt?: Date; +} diff --git a/src/api/resources/knowledgebase/types/AccountDetailsAndActions.ts b/src/api/resources/knowledgebase/types/AccountDetailsAndActions.ts new file mode 100644 index 000000000..adec04c1c --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsAndActions.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The LinkedAccount Object + * ### Description + * The `LinkedAccount` object is used to represent an end user's link with a specific integration. + * + * ### Usage Example + * View a list of your organization's `LinkedAccount` objects. + */ +export interface AccountDetailsAndActions { + id: string; + category?: Merge.knowledgebase.AccountDetailsAndActionsCategory; + status: Merge.knowledgebase.AccountDetailsAndActionsStatus; + statusDetail?: string; + endUserOriginId?: string; + endUserOrganizationName: string; + endUserEmailAddress: string; + /** The tenant or domain the customer has provided access to. */ + subdomain?: string; + webhookListenerUrl: string; + /** Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets. */ + isDuplicate?: boolean; + integration?: Merge.knowledgebase.AccountDetailsAndActionsIntegration; + accountType: string; + completedAt: Date; + integrationSpecificFields?: Record; +} diff --git a/src/api/resources/knowledgebase/types/AccountDetailsAndActionsCategory.ts b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsCategory.ts new file mode 100644 index 000000000..152c8817f --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsCategory.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type AccountDetailsAndActionsCategory = Merge.knowledgebase.CategoryEnum | string; diff --git a/src/api/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts new file mode 100644 index 000000000..58f74c8e0 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface AccountDetailsAndActionsIntegration { + name: string; + categories: Merge.knowledgebase.CategoriesEnum[]; + image?: string; + squareImage?: string; + color: string; + slug: string; + passthroughAvailable: boolean; + availableModelOperations?: Merge.knowledgebase.ModelOperation[]; +} diff --git a/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatus.ts b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatus.ts new file mode 100644 index 000000000..4c375101a --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatus.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type AccountDetailsAndActionsStatus = Merge.knowledgebase.AccountDetailsAndActionsStatusEnum | string; diff --git a/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts new file mode 100644 index 000000000..3a923df0f --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `COMPLETE` - COMPLETE + * * `INCOMPLETE` - INCOMPLETE + * * `RELINK_NEEDED` - RELINK_NEEDED + * * `IDLE` - IDLE + */ +export type AccountDetailsAndActionsStatusEnum = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; +export const AccountDetailsAndActionsStatusEnum = { + Complete: "COMPLETE", + Incomplete: "INCOMPLETE", + RelinkNeeded: "RELINK_NEEDED", + Idle: "IDLE", +} as const; diff --git a/src/api/resources/knowledgebase/types/AccountDetailsCategory.ts b/src/api/resources/knowledgebase/types/AccountDetailsCategory.ts new file mode 100644 index 000000000..411b6c821 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountDetailsCategory.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type AccountDetailsCategory = Merge.knowledgebase.CategoryEnum | string; diff --git a/src/api/resources/knowledgebase/types/AccountIntegration.ts b/src/api/resources/knowledgebase/types/AccountIntegration.ts new file mode 100644 index 000000000..ff0345553 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountIntegration.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface AccountIntegration { + /** Company name. */ + name: string; + /** Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) */ + abbreviatedName?: string; + /** Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. */ + categories?: Merge.knowledgebase.CategoriesEnum[]; + /** Company logo in rectangular shape. */ + image?: string; + /** Company logo in square shape. */ + squareImage?: string; + /** The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. */ + color?: string; + slug?: string; + /** Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} */ + apiEndpointsToDocumentationUrls?: Record; + /** Setup guide URL for third party webhook creation. Exposed in Merge Docs. */ + webhookSetupGuideUrl?: string; + /** Category or categories this integration is in beta status for. */ + categoryBetaStatus?: Record; +} diff --git a/src/api/resources/knowledgebase/types/AccountToken.ts b/src/api/resources/knowledgebase/types/AccountToken.ts new file mode 100644 index 000000000..de4e38d9c --- /dev/null +++ b/src/api/resources/knowledgebase/types/AccountToken.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface AccountToken { + accountToken: string; + integration: Merge.knowledgebase.AccountIntegration; + id: string; +} diff --git a/src/api/resources/knowledgebase/types/AdvancedMetadata.ts b/src/api/resources/knowledgebase/types/AdvancedMetadata.ts new file mode 100644 index 000000000..d53f2cd5e --- /dev/null +++ b/src/api/resources/knowledgebase/types/AdvancedMetadata.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AdvancedMetadata { + id: string; + displayName?: string; + description?: string; + isRequired?: boolean; + isCustom?: boolean; + fieldChoices?: unknown[]; +} diff --git a/src/api/resources/knowledgebase/types/Article.ts b/src/api/resources/knowledgebase/types/Article.ts new file mode 100644 index 000000000..5fe63983e --- /dev/null +++ b/src/api/resources/knowledgebase/types/Article.ts @@ -0,0 +1,77 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Article Object + * ### Description + * The `Article` object is used to represent a form of content in the knowledge base, such as an article or page. + * ### Usage Example + * Fetch from the `GET /api/knowledgebase/v1/articles` endpoint and view their articles. + */ +export interface Article { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + /** The title of the article. */ + title?: string; + /** Description of the article. */ + description?: string; + /** The user who created the article. */ + author?: Merge.knowledgebase.ArticleAuthor; + /** The user to last update the article. */ + lastEditedBy?: Merge.knowledgebase.ArticleLastEditedBy; + /** + * The visibility of the article. + * + * * `PUBLIC` - PUBLIC + * * `INTERNAL` - INTERNAL + * * `RESTRICTED` - RESTRICTED + */ + visibility?: Merge.knowledgebase.ArticleVisibility; + /** The presigned S3 URL to fetch article content. */ + articleContentDownloadUrl?: string; + /** The SHA256 checksum of the article content. */ + checksum?: string; + /** The URL to the webpage of the article. */ + articleUrl?: string; + /** + * The status of the article. + * + * * `DRAFT` - DRAFT + * * `PUBLISHED` - PUBLISHED + * * `ARCHIVED` - ARCHIVED + * * `TRASH` - TRASH + */ + status?: Merge.knowledgebase.ArticleStatus; + /** + * The type of the article. + * + * * `PAGE` - PAGE + * * `BLOG_POST` - BLOG_POST + * * `SMART_LINK` - SMART_LINK + */ + type?: Merge.knowledgebase.ArticleType; + /** When the third party's article was created. */ + remoteCreatedAt?: Date; + /** When the third party's article was updated. */ + remoteUpdatedAt?: Date; + /** The parent article an article is nested within. */ + parentArticle?: Merge.knowledgebase.ArticleParentArticle; + /** The parent container an article is nested within. */ + parentContainer?: Merge.knowledgebase.ArticleParentContainer; + /** The top-level container in the hierarchy that holds this article. This will reference a container object that will typically be a SPACE or WORKSPACE type. */ + rootContainer?: Merge.knowledgebase.ArticleRootContainer; + permissions?: Merge.knowledgebase.ArticlePermissionsItem[]; + attachments?: (Merge.knowledgebase.ArticleAttachmentsItem | undefined)[]; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is 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.knowledgebase.RemoteData[]; +} diff --git a/src/api/resources/knowledgebase/types/ArticleAttachmentsItem.ts b/src/api/resources/knowledgebase/types/ArticleAttachmentsItem.ts new file mode 100644 index 000000000..166f61cf2 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleAttachmentsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type ArticleAttachmentsItem = string | Merge.knowledgebase.Attachment; diff --git a/src/api/resources/knowledgebase/types/ArticleAuthor.ts b/src/api/resources/knowledgebase/types/ArticleAuthor.ts new file mode 100644 index 000000000..b77a3d433 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleAuthor.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The user who created the article. + */ +export type ArticleAuthor = string | Merge.knowledgebase.User; diff --git a/src/api/resources/knowledgebase/types/ArticleLastEditedBy.ts b/src/api/resources/knowledgebase/types/ArticleLastEditedBy.ts new file mode 100644 index 000000000..7f93d27d6 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleLastEditedBy.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The user to last update the article. + */ +export type ArticleLastEditedBy = string | Merge.knowledgebase.User; diff --git a/src/api/resources/knowledgebase/types/ArticleParentArticle.ts b/src/api/resources/knowledgebase/types/ArticleParentArticle.ts new file mode 100644 index 000000000..34f97e40e --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleParentArticle.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The parent article an article is nested within. + */ +export type ArticleParentArticle = string | Merge.knowledgebase.Article; diff --git a/src/api/resources/knowledgebase/types/ArticleParentContainer.ts b/src/api/resources/knowledgebase/types/ArticleParentContainer.ts new file mode 100644 index 000000000..c28d46ed6 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleParentContainer.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The parent container an article is nested within. + */ +export type ArticleParentContainer = string | Merge.knowledgebase.Container; diff --git a/src/api/resources/knowledgebase/types/ArticlePermissionsItem.ts b/src/api/resources/knowledgebase/types/ArticlePermissionsItem.ts new file mode 100644 index 000000000..2be258ccc --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticlePermissionsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type ArticlePermissionsItem = string | Merge.knowledgebase.Permission; diff --git a/src/api/resources/knowledgebase/types/ArticleRootContainer.ts b/src/api/resources/knowledgebase/types/ArticleRootContainer.ts new file mode 100644 index 000000000..7528830cc --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleRootContainer.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The top-level container in the hierarchy that holds this article. This will reference a container object that will typically be a SPACE or WORKSPACE type. + */ +export type ArticleRootContainer = string | Merge.knowledgebase.Container; diff --git a/src/api/resources/knowledgebase/types/ArticleStatus.ts b/src/api/resources/knowledgebase/types/ArticleStatus.ts new file mode 100644 index 000000000..08cb59aac --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleStatus.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The status of the article. + * + * * `DRAFT` - DRAFT + * * `PUBLISHED` - PUBLISHED + * * `ARCHIVED` - ARCHIVED + * * `TRASH` - TRASH + */ +export type ArticleStatus = Merge.knowledgebase.Status3C6Enum | string; diff --git a/src/api/resources/knowledgebase/types/ArticleType.ts b/src/api/resources/knowledgebase/types/ArticleType.ts new file mode 100644 index 000000000..1853208f9 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleType.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The type of the article. + * + * * `PAGE` - PAGE + * * `BLOG_POST` - BLOG_POST + * * `SMART_LINK` - SMART_LINK + */ +export type ArticleType = Merge.knowledgebase.ArticleTypeEnum | string; diff --git a/src/api/resources/knowledgebase/types/ArticleTypeEnum.ts b/src/api/resources/knowledgebase/types/ArticleTypeEnum.ts new file mode 100644 index 000000000..806ab922b --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleTypeEnum.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `PAGE` - PAGE + * * `BLOG_POST` - BLOG_POST + * * `SMART_LINK` - SMART_LINK + */ +export type ArticleTypeEnum = "PAGE" | "BLOG_POST" | "SMART_LINK"; +export const ArticleTypeEnum = { + Page: "PAGE", + BlogPost: "BLOG_POST", + SmartLink: "SMART_LINK", +} as const; diff --git a/src/api/resources/knowledgebase/types/ArticleVisibility.ts b/src/api/resources/knowledgebase/types/ArticleVisibility.ts new file mode 100644 index 000000000..b5bf05691 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ArticleVisibility.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The visibility of the article. + * + * * `PUBLIC` - PUBLIC + * * `INTERNAL` - INTERNAL + * * `RESTRICTED` - RESTRICTED + */ +export type ArticleVisibility = Merge.knowledgebase.VisibilityEnum | string; diff --git a/src/api/resources/knowledgebase/types/AsyncPassthroughReciept.ts b/src/api/resources/knowledgebase/types/AsyncPassthroughReciept.ts new file mode 100644 index 000000000..467d5e5a6 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AsyncPassthroughReciept.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AsyncPassthroughReciept { + asyncPassthroughReceiptId: string; +} diff --git a/src/api/resources/knowledgebase/types/Attachment.ts b/src/api/resources/knowledgebase/types/Attachment.ts new file mode 100644 index 000000000..a37415227 --- /dev/null +++ b/src/api/resources/knowledgebase/types/Attachment.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Attachment Object + * ### Description + * The `Attachment` object is used to represent an attachment to an article or container. + * ### Usage Example + * Fetch from the `GET /api/knowledgebase/v1/attachments` endpoint and view their attachments. + */ +export interface Attachment { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + /** The attachment's name. */ + name?: string; + /** The attachment's description. */ + description?: string; + /** The attachment's url. */ + attachmentUrl?: 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.knowledgebase.RemoteData[]; +} diff --git a/src/api/resources/knowledgebase/types/AuditLogEvent.ts b/src/api/resources/knowledgebase/types/AuditLogEvent.ts new file mode 100644 index 000000000..db1e783ef --- /dev/null +++ b/src/api/resources/knowledgebase/types/AuditLogEvent.ts @@ -0,0 +1,75 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface AuditLogEvent { + id?: string; + /** The User's full name at the time of this Event occurring. */ + userName?: string; + /** The User's email at the time of this Event occurring. */ + userEmail?: string; + /** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ + role: Merge.knowledgebase.AuditLogEventRole; + ipAddress: string; + /** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ + eventType: Merge.knowledgebase.AuditLogEventEventType; + eventDescription: string; + createdAt?: Date; +} diff --git a/src/api/resources/knowledgebase/types/AuditLogEventEventType.ts b/src/api/resources/knowledgebase/types/AuditLogEventEventType.ts new file mode 100644 index 000000000..631b4c6fd --- /dev/null +++ b/src/api/resources/knowledgebase/types/AuditLogEventEventType.ts @@ -0,0 +1,54 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * Designates the type of event that occurred. + * + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ +export type AuditLogEventEventType = Merge.knowledgebase.EventTypeEnum | string; diff --git a/src/api/resources/knowledgebase/types/AuditLogEventRole.ts b/src/api/resources/knowledgebase/types/AuditLogEventRole.ts new file mode 100644 index 000000000..f4d5fe430 --- /dev/null +++ b/src/api/resources/knowledgebase/types/AuditLogEventRole.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + * + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ +export type AuditLogEventRole = Merge.knowledgebase.RoleEnum | string; diff --git a/src/api/resources/knowledgebase/types/AvailableActions.ts b/src/api/resources/knowledgebase/types/AvailableActions.ts new file mode 100644 index 000000000..92a8b250c --- /dev/null +++ b/src/api/resources/knowledgebase/types/AvailableActions.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The AvailableActions Object + * ### Description + * The `Activity` object is used to see all available model/operation combinations for an integration. + * + * ### Usage Example + * Fetch all the actions available for the `Zenefits` integration. + */ +export interface AvailableActions { + integration: Merge.knowledgebase.AccountIntegration; + passthroughAvailable: boolean; + availableModelOperations?: Merge.knowledgebase.ModelOperation[]; +} diff --git a/src/api/resources/knowledgebase/types/CategoriesEnum.ts b/src/api/resources/knowledgebase/types/CategoriesEnum.ts new file mode 100644 index 000000000..6fe9da99b --- /dev/null +++ b/src/api/resources/knowledgebase/types/CategoriesEnum.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `hris` - hris + * * `ats` - ats + * * `accounting` - accounting + * * `ticketing` - ticketing + * * `crm` - crm + * * `mktg` - mktg + * * `filestorage` - filestorage + * * `knowledgebase` - knowledgebase + */ +export type CategoriesEnum = + | "hris" + | "ats" + | "accounting" + | "ticketing" + | "crm" + | "mktg" + | "filestorage" + | "knowledgebase"; +export const CategoriesEnum = { + Hris: "hris", + Ats: "ats", + Accounting: "accounting", + Ticketing: "ticketing", + Crm: "crm", + Mktg: "mktg", + Filestorage: "filestorage", + Knowledgebase: "knowledgebase", +} as const; diff --git a/src/api/resources/knowledgebase/types/CategoryEnum.ts b/src/api/resources/knowledgebase/types/CategoryEnum.ts new file mode 100644 index 000000000..9c331ebdd --- /dev/null +++ b/src/api/resources/knowledgebase/types/CategoryEnum.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `hris` - hris + * * `ats` - ats + * * `accounting` - accounting + * * `ticketing` - ticketing + * * `crm` - crm + * * `mktg` - mktg + * * `filestorage` - filestorage + * * `knowledgebase` - knowledgebase + */ +export type CategoryEnum = + | "hris" + | "ats" + | "accounting" + | "ticketing" + | "crm" + | "mktg" + | "filestorage" + | "knowledgebase"; +export const CategoryEnum = { + Hris: "hris", + Ats: "ats", + Accounting: "accounting", + Ticketing: "ticketing", + Crm: "crm", + Mktg: "mktg", + Filestorage: "filestorage", + Knowledgebase: "knowledgebase", +} as const; diff --git a/src/api/resources/knowledgebase/types/CommonModelScopeApi.ts b/src/api/resources/knowledgebase/types/CommonModelScopeApi.ts new file mode 100644 index 000000000..fb715b0cd --- /dev/null +++ b/src/api/resources/knowledgebase/types/CommonModelScopeApi.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface CommonModelScopeApi { + /** The common models you want to update the scopes for */ + commonModels: Merge.knowledgebase.IndividualCommonModelScopeDeserializer[]; +} diff --git a/src/api/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts b/src/api/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts new file mode 100644 index 000000000..20c0638f0 --- /dev/null +++ b/src/api/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface CommonModelScopesBodyRequest { + modelId: string; + enabledActions: Merge.knowledgebase.EnabledActionsEnum[]; + disabledFields: string[]; +} diff --git a/src/api/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts b/src/api/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts new file mode 100644 index 000000000..d16912ea3 --- /dev/null +++ b/src/api/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `SELECTIVE_SYNC` - SELECTIVE_SYNC + */ +export type CompletedAccountInitialScreenEnum = "SELECTIVE_SYNC"; diff --git a/src/api/resources/knowledgebase/types/Container.ts b/src/api/resources/knowledgebase/types/Container.ts new file mode 100644 index 000000000..07ed9b530 --- /dev/null +++ b/src/api/resources/knowledgebase/types/Container.ts @@ -0,0 +1,69 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Container Object + * ### Description + * The Container object is used to represent a grouping of articles in the knowledge base. This can include Spaces, Folders, Databases, etc. + * ### Usage Example + * Fetch from the `GET /api/knowledgebase/v1/containers` endpoint and view their containers. + */ +export interface Container { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + /** Name of the container. */ + name?: string; + /** Description of the container. */ + description?: string; + /** + * The container's status. + * + * * `DRAFT` - DRAFT + * * `PUBLISHED` - PUBLISHED + * * `ARCHIVED` - ARCHIVED + * * `TRASH` - TRASH + */ + status?: Merge.knowledgebase.ContainerStatus; + /** The URL to the webpage of the container. */ + containerUrl?: string; + /** + * The container's type. + * + * * `FOLDER` - FOLDER + * * `SPACE` - SPACE + * * `COLLECTION` - COLLECTION + * * `SECTION` - SECTION + * * `CATEGORY` - CATEGORY + * * `DATABASE` - DATABASE + */ + type?: Merge.knowledgebase.ContainerType; + /** + * The container's visibility. + * + * * `PUBLIC` - PUBLIC + * * `INTERNAL` - INTERNAL + * * `RESTRICTED` - RESTRICTED + */ + visibility?: Merge.knowledgebase.ContainerVisibility; + /** When the third party's container was created. */ + remoteCreatedAt?: Date; + /** When the third party's container was updated. */ + remoteUpdatedAt?: Date; + /** The parent article a container is nested within. */ + parentArticle?: string; + /** The parent container a container is nested within. */ + parentContainer?: string; + permissions?: Merge.knowledgebase.ContainerPermissionsItem[]; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is 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.knowledgebase.RemoteData[]; +} diff --git a/src/api/resources/knowledgebase/types/ContainerPermissionsItem.ts b/src/api/resources/knowledgebase/types/ContainerPermissionsItem.ts new file mode 100644 index 000000000..d146336a0 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ContainerPermissionsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type ContainerPermissionsItem = string | Merge.knowledgebase.Permission; diff --git a/src/api/resources/knowledgebase/types/ContainerStatus.ts b/src/api/resources/knowledgebase/types/ContainerStatus.ts new file mode 100644 index 000000000..ac90bfa42 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ContainerStatus.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The container's status. + * + * * `DRAFT` - DRAFT + * * `PUBLISHED` - PUBLISHED + * * `ARCHIVED` - ARCHIVED + * * `TRASH` - TRASH + */ +export type ContainerStatus = Merge.knowledgebase.Status3C6Enum | string; diff --git a/src/api/resources/knowledgebase/types/ContainerType.ts b/src/api/resources/knowledgebase/types/ContainerType.ts new file mode 100644 index 000000000..64fde4a30 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ContainerType.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The container's type. + * + * * `FOLDER` - FOLDER + * * `SPACE` - SPACE + * * `COLLECTION` - COLLECTION + * * `SECTION` - SECTION + * * `CATEGORY` - CATEGORY + * * `DATABASE` - DATABASE + */ +export type ContainerType = Merge.knowledgebase.ContainerTypeEnum | string; diff --git a/src/api/resources/knowledgebase/types/ContainerTypeEnum.ts b/src/api/resources/knowledgebase/types/ContainerTypeEnum.ts new file mode 100644 index 000000000..625ba1c70 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ContainerTypeEnum.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `FOLDER` - FOLDER + * * `SPACE` - SPACE + * * `COLLECTION` - COLLECTION + * * `SECTION` - SECTION + * * `CATEGORY` - CATEGORY + * * `DATABASE` - DATABASE + */ +export type ContainerTypeEnum = "FOLDER" | "SPACE" | "COLLECTION" | "SECTION" | "CATEGORY" | "DATABASE"; +export const ContainerTypeEnum = { + Folder: "FOLDER", + Space: "SPACE", + Collection: "COLLECTION", + Section: "SECTION", + Category: "CATEGORY", + Database: "DATABASE", +} as const; diff --git a/src/api/resources/knowledgebase/types/ContainerVisibility.ts b/src/api/resources/knowledgebase/types/ContainerVisibility.ts new file mode 100644 index 000000000..a42da44b1 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ContainerVisibility.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The container's visibility. + * + * * `PUBLIC` - PUBLIC + * * `INTERNAL` - INTERNAL + * * `RESTRICTED` - RESTRICTED + */ +export type ContainerVisibility = Merge.knowledgebase.VisibilityEnum | string; diff --git a/src/api/resources/knowledgebase/types/DataPassthroughRequest.ts b/src/api/resources/knowledgebase/types/DataPassthroughRequest.ts new file mode 100644 index 000000000..c29eea28e --- /dev/null +++ b/src/api/resources/knowledgebase/types/DataPassthroughRequest.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The DataPassthrough Object + * ### Description + * The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. + * + * ### Usage Example + * Create a `DataPassthrough` to get team hierarchies from your Rippling integration. + */ +export interface DataPassthroughRequest { + method: Merge.knowledgebase.DataPassthroughRequestMethod; + /** The path of the request in the third party's platform. */ + path: string; + /** An optional override of the third party's base url for the request. */ + baseUrlOverride?: string; + /** The data with the request. You must include a `request_format` parameter matching the data's format */ + data?: string; + /** Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. */ + multipartFormData?: Merge.knowledgebase.MultipartFormFieldRequest[]; + /** The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. */ + headers?: Record; + requestFormat?: Merge.knowledgebase.DataPassthroughRequestRequestFormat; + /** Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. */ + normalizeResponse?: boolean; +} diff --git a/src/api/resources/knowledgebase/types/DataPassthroughRequestMethod.ts b/src/api/resources/knowledgebase/types/DataPassthroughRequestMethod.ts new file mode 100644 index 000000000..5b6853c04 --- /dev/null +++ b/src/api/resources/knowledgebase/types/DataPassthroughRequestMethod.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type DataPassthroughRequestMethod = Merge.knowledgebase.MethodEnum | string; diff --git a/src/api/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.ts b/src/api/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.ts new file mode 100644 index 000000000..1aad375e4 --- /dev/null +++ b/src/api/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type DataPassthroughRequestRequestFormat = Merge.knowledgebase.RequestFormatEnum | string; diff --git a/src/api/resources/knowledgebase/types/DebugModeLog.ts b/src/api/resources/knowledgebase/types/DebugModeLog.ts new file mode 100644 index 000000000..c995e5a5b --- /dev/null +++ b/src/api/resources/knowledgebase/types/DebugModeLog.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface DebugModeLog { + logId: string; + dashboardView: string; + logSummary: Merge.knowledgebase.DebugModelLogSummary; +} diff --git a/src/api/resources/knowledgebase/types/DebugModelLogSummary.ts b/src/api/resources/knowledgebase/types/DebugModelLogSummary.ts new file mode 100644 index 000000000..28c24d1f8 --- /dev/null +++ b/src/api/resources/knowledgebase/types/DebugModelLogSummary.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface DebugModelLogSummary { + url: string; + method: string; + statusCode: number; +} diff --git a/src/api/resources/knowledgebase/types/EnabledActionsEnum.ts b/src/api/resources/knowledgebase/types/EnabledActionsEnum.ts new file mode 100644 index 000000000..62022883a --- /dev/null +++ b/src/api/resources/knowledgebase/types/EnabledActionsEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `READ` - READ + * * `WRITE` - WRITE + */ +export type EnabledActionsEnum = "READ" | "WRITE"; +export const EnabledActionsEnum = { + Read: "READ", + Write: "WRITE", +} as const; diff --git a/src/api/resources/knowledgebase/types/EncodingEnum.ts b/src/api/resources/knowledgebase/types/EncodingEnum.ts new file mode 100644 index 000000000..4dfc82b61 --- /dev/null +++ b/src/api/resources/knowledgebase/types/EncodingEnum.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `RAW` - RAW + * * `BASE64` - BASE64 + * * `GZIP_BASE64` - GZIP_BASE64 + */ +export type EncodingEnum = "RAW" | "BASE64" | "GZIP_BASE64"; +export const EncodingEnum = { + Raw: "RAW", + Base64: "BASE64", + GzipBase64: "GZIP_BASE64", +} as const; diff --git a/src/api/resources/knowledgebase/types/ErrorValidationProblem.ts b/src/api/resources/knowledgebase/types/ErrorValidationProblem.ts new file mode 100644 index 000000000..85c797867 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ErrorValidationProblem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface ErrorValidationProblem { + source?: Merge.knowledgebase.ValidationProblemSource; + title: string; + detail: string; + problemType: string; +} diff --git a/src/api/resources/knowledgebase/types/EventTypeEnum.ts b/src/api/resources/knowledgebase/types/EventTypeEnum.ts new file mode 100644 index 000000000..261c00e43 --- /dev/null +++ b/src/api/resources/knowledgebase/types/EventTypeEnum.ts @@ -0,0 +1,138 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + * * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + * * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + * * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + * * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + * * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + * * `INVITED_USER` - INVITED_USER + * * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + * * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + * * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + * * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + * * `CREATED_DESTINATION` - CREATED_DESTINATION + * * `DELETED_DESTINATION` - DELETED_DESTINATION + * * `CHANGED_DESTINATION` - CHANGED_DESTINATION + * * `CHANGED_SCOPES` - CHANGED_SCOPES + * * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + * * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + * * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + * * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + * * `ENABLED_CATEGORY` - ENABLED_CATEGORY + * * `DISABLED_CATEGORY` - DISABLED_CATEGORY + * * `CHANGED_PASSWORD` - CHANGED_PASSWORD + * * `RESET_PASSWORD` - RESET_PASSWORD + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + * * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + * * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + * * `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING + * * `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING + * * `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + * * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + * * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + * * `MUTED_ISSUE` - MUTED_ISSUE + * * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + * * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + * * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + * * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + * * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + */ +export type EventTypeEnum = + | "CREATED_REMOTE_PRODUCTION_API_KEY" + | "DELETED_REMOTE_PRODUCTION_API_KEY" + | "CREATED_TEST_API_KEY" + | "DELETED_TEST_API_KEY" + | "REGENERATED_PRODUCTION_API_KEY" + | "REGENERATED_WEBHOOK_SIGNATURE" + | "INVITED_USER" + | "TWO_FACTOR_AUTH_ENABLED" + | "TWO_FACTOR_AUTH_DISABLED" + | "DELETED_LINKED_ACCOUNT" + | "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + | "CREATED_DESTINATION" + | "DELETED_DESTINATION" + | "CHANGED_DESTINATION" + | "CHANGED_SCOPES" + | "CHANGED_PERSONAL_INFORMATION" + | "CHANGED_ORGANIZATION_SETTINGS" + | "ENABLED_INTEGRATION" + | "DISABLED_INTEGRATION" + | "ENABLED_CATEGORY" + | "DISABLED_CATEGORY" + | "CHANGED_PASSWORD" + | "RESET_PASSWORD" + | "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + | "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + | "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + | "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + | "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + | "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + | "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + | "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + | "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + | "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + | "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "FORCED_LINKED_ACCOUNT_RESYNC" + | "MUTED_ISSUE" + | "GENERATED_MAGIC_LINK" + | "ENABLED_MERGE_WEBHOOK" + | "DISABLED_MERGE_WEBHOOK" + | "MERGE_WEBHOOK_TARGET_CHANGED" + | "END_USER_CREDENTIALS_ACCESSED"; +export const EventTypeEnum = { + CreatedRemoteProductionApiKey: "CREATED_REMOTE_PRODUCTION_API_KEY", + DeletedRemoteProductionApiKey: "DELETED_REMOTE_PRODUCTION_API_KEY", + 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", + DeletedLinkedAccount: "DELETED_LINKED_ACCOUNT", + DeletedAllCommonModelsForLinkedAccount: "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT", + CreatedDestination: "CREATED_DESTINATION", + DeletedDestination: "DELETED_DESTINATION", + ChangedDestination: "CHANGED_DESTINATION", + ChangedScopes: "CHANGED_SCOPES", + ChangedPersonalInformation: "CHANGED_PERSONAL_INFORMATION", + ChangedOrganizationSettings: "CHANGED_ORGANIZATION_SETTINGS", + EnabledIntegration: "ENABLED_INTEGRATION", + DisabledIntegration: "DISABLED_INTEGRATION", + EnabledCategory: "ENABLED_CATEGORY", + DisabledCategory: "DISABLED_CATEGORY", + ChangedPassword: "CHANGED_PASSWORD", + ResetPassword: "RESET_PASSWORD", + EnabledRedactUnmappedDataForOrganization: "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", + EnabledRedactUnmappedDataForLinkedAccount: "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", + DisabledRedactUnmappedDataForOrganization: "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", + DisabledRedactUnmappedDataForLinkedAccount: "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", + CreatedIntegrationWideFieldMapping: "CREATED_INTEGRATION_WIDE_FIELD_MAPPING", + CreatedLinkedAccountFieldMapping: "CREATED_LINKED_ACCOUNT_FIELD_MAPPING", + ChangedIntegrationWideFieldMapping: "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING", + ChangedLinkedAccountFieldMapping: "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING", + DeletedIntegrationWideFieldMapping: "DELETED_INTEGRATION_WIDE_FIELD_MAPPING", + DeletedLinkedAccountFieldMapping: "DELETED_LINKED_ACCOUNT_FIELD_MAPPING", + CreatedLinkedAccountCommonModelOverride: "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + ChangedLinkedAccountCommonModelOverride: "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + DeletedLinkedAccountCommonModelOverride: "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + ForcedLinkedAccountResync: "FORCED_LINKED_ACCOUNT_RESYNC", + MutedIssue: "MUTED_ISSUE", + GeneratedMagicLink: "GENERATED_MAGIC_LINK", + EnabledMergeWebhook: "ENABLED_MERGE_WEBHOOK", + DisabledMergeWebhook: "DISABLED_MERGE_WEBHOOK", + MergeWebhookTargetChanged: "MERGE_WEBHOOK_TARGET_CHANGED", + EndUserCredentialsAccessed: "END_USER_CREDENTIALS_ACCESSED", +} as const; diff --git a/src/api/resources/knowledgebase/types/ExternalTargetFieldApi.ts b/src/api/resources/knowledgebase/types/ExternalTargetFieldApi.ts new file mode 100644 index 000000000..4b15383d6 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ExternalTargetFieldApi.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ExternalTargetFieldApi { + name?: string; + description?: string; + isMapped?: string; +} diff --git a/src/api/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts b/src/api/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts new file mode 100644 index 000000000..182279ed7 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface ExternalTargetFieldApiResponse { + container?: Merge.knowledgebase.ExternalTargetFieldApi[]; + article?: Merge.knowledgebase.ExternalTargetFieldApi[]; + attachment?: Merge.knowledgebase.ExternalTargetFieldApi[]; + user?: Merge.knowledgebase.ExternalTargetFieldApi[]; + group?: Merge.knowledgebase.ExternalTargetFieldApi[]; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingApiInstance.ts b/src/api/resources/knowledgebase/types/FieldMappingApiInstance.ts new file mode 100644 index 000000000..5d94f0dd6 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingApiInstance.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface FieldMappingApiInstance { + id?: string; + isIntegrationWide?: boolean; + targetField?: Merge.knowledgebase.FieldMappingApiInstanceTargetField; + remoteField?: Merge.knowledgebase.FieldMappingApiInstanceRemoteField; + jmesPath?: string; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts new file mode 100644 index 000000000..335a414a2 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface FieldMappingApiInstanceRemoteField { + remoteKeyName?: string; + schema?: Record; + remoteEndpointInfo: Merge.knowledgebase.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts new file mode 100644 index 000000000..29a200b40 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + method?: string; + urlPath?: string; + fieldTraversalPath?: string[]; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts new file mode 100644 index 000000000..a6c0c3b42 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface FieldMappingApiInstanceResponse { + container?: Merge.knowledgebase.FieldMappingApiInstance[]; + article?: Merge.knowledgebase.FieldMappingApiInstance[]; + attachment?: Merge.knowledgebase.FieldMappingApiInstance[]; + user?: Merge.knowledgebase.FieldMappingApiInstance[]; + group?: Merge.knowledgebase.FieldMappingApiInstance[]; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts new file mode 100644 index 000000000..6ab7b2482 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FieldMappingApiInstanceTargetField { + name: string; + description: string; + isOrganizationWide: boolean; +} diff --git a/src/api/resources/knowledgebase/types/FieldMappingInstanceResponse.ts b/src/api/resources/knowledgebase/types/FieldMappingInstanceResponse.ts new file mode 100644 index 000000000..b95d345b7 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldMappingInstanceResponse.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface FieldMappingInstanceResponse { + model: Merge.knowledgebase.FieldMappingApiInstance; + warnings: Merge.knowledgebase.WarningValidationProblem[]; + errors: Merge.knowledgebase.ErrorValidationProblem[]; + logs?: Merge.knowledgebase.DebugModeLog[]; +} diff --git a/src/api/resources/knowledgebase/types/FieldPermissionDeserializer.ts b/src/api/resources/knowledgebase/types/FieldPermissionDeserializer.ts new file mode 100644 index 000000000..1be021a9f --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldPermissionDeserializer.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FieldPermissionDeserializer { + enabledFields?: unknown[]; + disabledFields?: unknown[]; +} diff --git a/src/api/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts b/src/api/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts new file mode 100644 index 000000000..6d94068e3 --- /dev/null +++ b/src/api/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FieldPermissionDeserializerRequest { + enabledFields?: unknown[]; + disabledFields?: unknown[]; +} diff --git a/src/api/resources/knowledgebase/types/Group.ts b/src/api/resources/knowledgebase/types/Group.ts new file mode 100644 index 000000000..643cf2abd --- /dev/null +++ b/src/api/resources/knowledgebase/types/Group.ts @@ -0,0 +1,31 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Group Object + * ### Description + * The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. + * ### Usage Example + * Fetch from the `GET /api/knowledgebase/v1/groups` endpoint and view their groups. + */ +export interface Group { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + /** The group's name. */ + name?: string; + /** The parent group for this group. */ + parentGroup?: Merge.knowledgebase.GroupParentGroup; + users?: Merge.knowledgebase.GroupUsersItem[]; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is 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.knowledgebase.RemoteData[]; +} diff --git a/src/api/resources/knowledgebase/types/GroupParentGroup.ts b/src/api/resources/knowledgebase/types/GroupParentGroup.ts new file mode 100644 index 000000000..1a6e853cc --- /dev/null +++ b/src/api/resources/knowledgebase/types/GroupParentGroup.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The parent group for this group. + */ +export type GroupParentGroup = string | Merge.knowledgebase.Group; diff --git a/src/api/resources/knowledgebase/types/GroupUsersItem.ts b/src/api/resources/knowledgebase/types/GroupUsersItem.ts new file mode 100644 index 000000000..09eabbafa --- /dev/null +++ b/src/api/resources/knowledgebase/types/GroupUsersItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type GroupUsersItem = string | Merge.knowledgebase.User; diff --git a/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts b/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts new file mode 100644 index 000000000..bf9977689 --- /dev/null +++ b/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface IndividualCommonModelScopeDeserializer { + modelName: string; + modelPermissions?: Record; + fieldPermissions?: Merge.knowledgebase.FieldPermissionDeserializer; +} diff --git a/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts new file mode 100644 index 000000000..83f34eacb --- /dev/null +++ b/src/api/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface IndividualCommonModelScopeDeserializerRequest { + modelName: string; + modelPermissions?: Record; + fieldPermissions?: Merge.knowledgebase.FieldPermissionDeserializerRequest; +} diff --git a/src/api/resources/knowledgebase/types/Issue.ts b/src/api/resources/knowledgebase/types/Issue.ts new file mode 100644 index 000000000..dbe9db713 --- /dev/null +++ b/src/api/resources/knowledgebase/types/Issue.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface Issue { + id?: string; + /** + * Status of the issue. Options: ('ONGOING', 'RESOLVED') + * + * * `ONGOING` - ONGOING + * * `RESOLVED` - RESOLVED + */ + status?: Merge.knowledgebase.IssueStatus; + errorDescription: string; + endUser?: Record; + firstIncidentTime?: Date; + lastIncidentTime?: Date; + isMuted?: boolean; + errorDetails?: string[]; +} diff --git a/src/api/resources/knowledgebase/types/IssueStatus.ts b/src/api/resources/knowledgebase/types/IssueStatus.ts new file mode 100644 index 000000000..56670e862 --- /dev/null +++ b/src/api/resources/knowledgebase/types/IssueStatus.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * Status of the issue. Options: ('ONGOING', 'RESOLVED') + * + * * `ONGOING` - ONGOING + * * `RESOLVED` - RESOLVED + */ +export type IssueStatus = Merge.knowledgebase.IssueStatusEnum | string; diff --git a/src/api/resources/knowledgebase/types/IssueStatusEnum.ts b/src/api/resources/knowledgebase/types/IssueStatusEnum.ts new file mode 100644 index 000000000..324e8bf84 --- /dev/null +++ b/src/api/resources/knowledgebase/types/IssueStatusEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `ONGOING` - ONGOING + * * `RESOLVED` - RESOLVED + */ +export type IssueStatusEnum = "ONGOING" | "RESOLVED"; +export const IssueStatusEnum = { + Ongoing: "ONGOING", + Resolved: "RESOLVED", +} as const; diff --git a/src/api/resources/knowledgebase/types/LanguageEnum.ts b/src/api/resources/knowledgebase/types/LanguageEnum.ts new file mode 100644 index 000000000..6c41852c3 --- /dev/null +++ b/src/api/resources/knowledgebase/types/LanguageEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `en` - en + * * `de` - de + */ +export type LanguageEnum = "en" | "de"; +export const LanguageEnum = { + En: "en", + De: "de", +} as const; diff --git a/src/api/resources/knowledgebase/types/LastSyncResultEnum.ts b/src/api/resources/knowledgebase/types/LastSyncResultEnum.ts new file mode 100644 index 000000000..434329895 --- /dev/null +++ b/src/api/resources/knowledgebase/types/LastSyncResultEnum.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `SYNCING` - SYNCING + * * `DONE` - DONE + * * `FAILED` - FAILED + * * `DISABLED` - DISABLED + * * `PAUSED` - PAUSED + * * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + */ +export type LastSyncResultEnum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; +export const LastSyncResultEnum = { + Syncing: "SYNCING", + Done: "DONE", + Failed: "FAILED", + Disabled: "DISABLED", + Paused: "PAUSED", + PartiallySynced: "PARTIALLY_SYNCED", +} as const; diff --git a/src/api/resources/knowledgebase/types/LinkToken.ts b/src/api/resources/knowledgebase/types/LinkToken.ts new file mode 100644 index 000000000..49718210b --- /dev/null +++ b/src/api/resources/knowledgebase/types/LinkToken.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LinkToken { + linkToken: string; + integrationName?: string; + magicLinkUrl?: string; +} diff --git a/src/api/resources/knowledgebase/types/MethodEnum.ts b/src/api/resources/knowledgebase/types/MethodEnum.ts new file mode 100644 index 000000000..0c151e94f --- /dev/null +++ b/src/api/resources/knowledgebase/types/MethodEnum.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `GET` - GET + * * `OPTIONS` - OPTIONS + * * `HEAD` - HEAD + * * `POST` - POST + * * `PUT` - PUT + * * `PATCH` - PATCH + * * `DELETE` - DELETE + */ +export type MethodEnum = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; +export const MethodEnum = { + Get: "GET", + Options: "OPTIONS", + Head: "HEAD", + Post: "POST", + Put: "PUT", + Patch: "PATCH", + Delete: "DELETE", +} as const; diff --git a/src/api/resources/knowledgebase/types/ModelOperation.ts b/src/api/resources/knowledgebase/types/ModelOperation.ts new file mode 100644 index 000000000..d2035b050 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ModelOperation.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * # The ModelOperation Object + * ### Description + * The `ModelOperation` object is used to represent the operations that are currently supported for a given model. + * + * ### Usage Example + * View what operations are supported for the `Candidate` endpoint. + */ +export interface ModelOperation { + modelName: string; + availableOperations: string[]; + requiredPostParameters: string[]; + supportedFields: string[]; +} diff --git a/src/api/resources/knowledgebase/types/ModelPermissionDeserializer.ts b/src/api/resources/knowledgebase/types/ModelPermissionDeserializer.ts new file mode 100644 index 000000000..d89666547 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ModelPermissionDeserializer.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ModelPermissionDeserializer { + isEnabled?: boolean; +} diff --git a/src/api/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts b/src/api/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts new file mode 100644 index 000000000..2e10e9e91 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ModelPermissionDeserializerRequest { + isEnabled?: boolean; +} diff --git a/src/api/resources/knowledgebase/types/MultipartFormFieldRequest.ts b/src/api/resources/knowledgebase/types/MultipartFormFieldRequest.ts new file mode 100644 index 000000000..1c48292c8 --- /dev/null +++ b/src/api/resources/knowledgebase/types/MultipartFormFieldRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The MultipartFormField Object + * ### Description + * The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. + * + * ### Usage Example + * Create a `MultipartFormField` to define a multipart form entry. + */ +export interface MultipartFormFieldRequest { + /** The name of the form field */ + name: string; + /** The data for the form field. */ + data: string; + /** + * The encoding of the value of `data`. Defaults to `RAW` if not defined. + * + * * `RAW` - RAW + * * `BASE64` - BASE64 + * * `GZIP_BASE64` - GZIP_BASE64 + */ + encoding?: Merge.knowledgebase.MultipartFormFieldRequestEncoding; + /** The file name of the form field, if the field is for a file. */ + fileName?: string; + /** The MIME type of the file, if the field is for a file. */ + contentType?: string; +} diff --git a/src/api/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.ts b/src/api/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.ts new file mode 100644 index 000000000..64045319f --- /dev/null +++ b/src/api/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * The encoding of the value of `data`. Defaults to `RAW` if not defined. + * + * * `RAW` - RAW + * * `BASE64` - BASE64 + * * `GZIP_BASE64` - GZIP_BASE64 + */ +export type MultipartFormFieldRequestEncoding = Merge.knowledgebase.EncodingEnum | string; diff --git a/src/api/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts b/src/api/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts new file mode 100644 index 000000000..dd55b9040 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedAccountDetailsAndActionsList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.AccountDetailsAndActions[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedArticleList.ts b/src/api/resources/knowledgebase/types/PaginatedArticleList.ts new file mode 100644 index 000000000..aaa85cb37 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedArticleList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedArticleList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.Article[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedAttachmentList.ts b/src/api/resources/knowledgebase/types/PaginatedAttachmentList.ts new file mode 100644 index 000000000..5f75d59ac --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedAttachmentList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedAttachmentList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.Attachment[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedAuditLogEventList.ts b/src/api/resources/knowledgebase/types/PaginatedAuditLogEventList.ts new file mode 100644 index 000000000..14bd6e54a --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedAuditLogEventList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedAuditLogEventList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.AuditLogEvent[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedContainerList.ts b/src/api/resources/knowledgebase/types/PaginatedContainerList.ts new file mode 100644 index 000000000..4fc70c6ec --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedContainerList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedContainerList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.Container[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedGroupList.ts b/src/api/resources/knowledgebase/types/PaginatedGroupList.ts new file mode 100644 index 000000000..d7d4452cd --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedGroupList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedGroupList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.Group[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedIssueList.ts b/src/api/resources/knowledgebase/types/PaginatedIssueList.ts new file mode 100644 index 000000000..e752ffe12 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedIssueList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedIssueList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.Issue[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedSyncStatusList.ts b/src/api/resources/knowledgebase/types/PaginatedSyncStatusList.ts new file mode 100644 index 000000000..4be098bbb --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedSyncStatusList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedSyncStatusList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.SyncStatus[]; +} diff --git a/src/api/resources/knowledgebase/types/PaginatedUserList.ts b/src/api/resources/knowledgebase/types/PaginatedUserList.ts new file mode 100644 index 000000000..94e1b9345 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PaginatedUserList.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface PaginatedUserList { + next?: string; + previous?: string; + results?: Merge.knowledgebase.User[]; +} diff --git a/src/api/resources/knowledgebase/types/Permission.ts b/src/api/resources/knowledgebase/types/Permission.ts new file mode 100644 index 000000000..5d3e829e8 --- /dev/null +++ b/src/api/resources/knowledgebase/types/Permission.ts @@ -0,0 +1,37 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The Permission Object + * ### Description + * The `Permission` object is used to represent a user's or group's access to an article or container. Permissions are unexpanded by default. + * ### Usage Example + */ +export interface Permission { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + user?: Merge.knowledgebase.PermissionUser; + group?: Merge.knowledgebase.PermissionGroup; + /** + * Denotes what type of people have access to the Article or Container. + * + * * `USER` - USER + * * `GROUP` - GROUP + * * `COMPANY` - COMPANY + * * `ANYONE` - ANYONE + */ + type?: Merge.knowledgebase.PermissionType; + /** The permissions that the user or group has for the Article or Container. It is possible for a user or group to have multiple roles, such as viewing & uploading. */ + roles?: (Merge.knowledgebase.RolesEnum | undefined)[]; + /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is 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; +} diff --git a/src/api/resources/knowledgebase/types/PermissionGroup.ts b/src/api/resources/knowledgebase/types/PermissionGroup.ts new file mode 100644 index 000000000..943e54a88 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PermissionGroup.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type PermissionGroup = string | Merge.knowledgebase.Group; diff --git a/src/api/resources/knowledgebase/types/PermissionType.ts b/src/api/resources/knowledgebase/types/PermissionType.ts new file mode 100644 index 000000000..81c4bdf17 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PermissionType.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * Denotes what type of people have access to the Article or Container. + * + * * `USER` - USER + * * `GROUP` - GROUP + * * `COMPANY` - COMPANY + * * `ANYONE` - ANYONE + */ +export type PermissionType = Merge.knowledgebase.PermissionTypeEnum | string; diff --git a/src/api/resources/knowledgebase/types/PermissionTypeEnum.ts b/src/api/resources/knowledgebase/types/PermissionTypeEnum.ts new file mode 100644 index 000000000..9e262d546 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PermissionTypeEnum.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `USER` - USER + * * `GROUP` - GROUP + * * `COMPANY` - COMPANY + * * `ANYONE` - ANYONE + */ +export type PermissionTypeEnum = "USER" | "GROUP" | "COMPANY" | "ANYONE"; +export const PermissionTypeEnum = { + User: "USER", + Group: "GROUP", + Company: "COMPANY", + Anyone: "ANYONE", +} as const; diff --git a/src/api/resources/knowledgebase/types/PermissionUser.ts b/src/api/resources/knowledgebase/types/PermissionUser.ts new file mode 100644 index 000000000..51e499c56 --- /dev/null +++ b/src/api/resources/knowledgebase/types/PermissionUser.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type PermissionUser = string | Merge.knowledgebase.User; diff --git a/src/api/resources/knowledgebase/types/RemoteData.ts b/src/api/resources/knowledgebase/types/RemoteData.ts new file mode 100644 index 000000000..ab15ac8ee --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteData.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * # The RemoteData Object + * ### Description + * The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. + * + * ### Usage Example + * TODO + */ +export interface RemoteData { + /** The third-party API path that is being called. */ + path: string; + data?: unknown; +} diff --git a/src/api/resources/knowledgebase/types/RemoteEndpointInfo.ts b/src/api/resources/knowledgebase/types/RemoteEndpointInfo.ts new file mode 100644 index 000000000..495dac5fa --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteEndpointInfo.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface RemoteEndpointInfo { + method: string; + urlPath: string; + fieldTraversalPath: unknown[]; +} diff --git a/src/api/resources/knowledgebase/types/RemoteFieldApi.ts b/src/api/resources/knowledgebase/types/RemoteFieldApi.ts new file mode 100644 index 000000000..e7470221c --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteFieldApi.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface RemoteFieldApi { + schema: Record; + remoteKeyName: string; + remoteEndpointInfo: Merge.knowledgebase.RemoteEndpointInfo; + exampleValues?: unknown[]; + advancedMetadata?: Merge.knowledgebase.RemoteFieldApiAdvancedMetadata; + coverage?: Merge.knowledgebase.RemoteFieldApiCoverage; +} diff --git a/src/api/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.ts b/src/api/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.ts new file mode 100644 index 000000000..f8356487d --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type RemoteFieldApiAdvancedMetadata = Merge.knowledgebase.AdvancedMetadata | string; diff --git a/src/api/resources/knowledgebase/types/RemoteFieldApiCoverage.ts b/src/api/resources/knowledgebase/types/RemoteFieldApiCoverage.ts new file mode 100644 index 000000000..9a8f479f8 --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteFieldApiCoverage.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type RemoteFieldApiCoverage = number | number; diff --git a/src/api/resources/knowledgebase/types/RemoteFieldApiResponse.ts b/src/api/resources/knowledgebase/types/RemoteFieldApiResponse.ts new file mode 100644 index 000000000..ed7258488 --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteFieldApiResponse.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface RemoteFieldApiResponse { + container?: Merge.knowledgebase.RemoteFieldApi[]; + article?: Merge.knowledgebase.RemoteFieldApi[]; + attachment?: Merge.knowledgebase.RemoteFieldApi[]; + user?: Merge.knowledgebase.RemoteFieldApi[]; + group?: Merge.knowledgebase.RemoteFieldApi[]; +} diff --git a/src/api/resources/knowledgebase/types/RemoteKey.ts b/src/api/resources/knowledgebase/types/RemoteKey.ts new file mode 100644 index 000000000..6f8bf2dbf --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteKey.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * # The RemoteKey Object + * ### Description + * The `RemoteKey` object is used to represent a request for a new remote key. + * + * ### Usage Example + * Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + */ +export interface RemoteKey { + name: string; + key: string; +} diff --git a/src/api/resources/knowledgebase/types/RemoteResponse.ts b/src/api/resources/knowledgebase/types/RemoteResponse.ts new file mode 100644 index 000000000..3873b08bd --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteResponse.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The RemoteResponse Object + * ### Description + * The `RemoteResponse` object is used to represent information returned from a third-party endpoint. + * + * ### Usage Example + * View the `RemoteResponse` returned from your `DataPassthrough`. + */ +export interface RemoteResponse { + method: string; + path: string; + status: number; + response?: unknown; + responseHeaders?: Record; + responseType?: Merge.knowledgebase.RemoteResponseResponseType; + headers?: Record; +} diff --git a/src/api/resources/knowledgebase/types/RemoteResponseResponseType.ts b/src/api/resources/knowledgebase/types/RemoteResponseResponseType.ts new file mode 100644 index 000000000..3c0077913 --- /dev/null +++ b/src/api/resources/knowledgebase/types/RemoteResponseResponseType.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type RemoteResponseResponseType = Merge.knowledgebase.ResponseTypeEnum | string; diff --git a/src/api/resources/knowledgebase/types/RequestFormatEnum.ts b/src/api/resources/knowledgebase/types/RequestFormatEnum.ts new file mode 100644 index 000000000..132d6eea5 --- /dev/null +++ b/src/api/resources/knowledgebase/types/RequestFormatEnum.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `JSON` - JSON + * * `XML` - XML + * * `MULTIPART` - MULTIPART + */ +export type RequestFormatEnum = "JSON" | "XML" | "MULTIPART"; +export const RequestFormatEnum = { + Json: "JSON", + Xml: "XML", + Multipart: "MULTIPART", +} as const; diff --git a/src/api/resources/knowledgebase/types/ResponseTypeEnum.ts b/src/api/resources/knowledgebase/types/ResponseTypeEnum.ts new file mode 100644 index 000000000..5bef2d16e --- /dev/null +++ b/src/api/resources/knowledgebase/types/ResponseTypeEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `JSON` - JSON + * * `BASE64_GZIP` - BASE64_GZIP + */ +export type ResponseTypeEnum = "JSON" | "BASE64_GZIP"; +export const ResponseTypeEnum = { + Json: "JSON", + Base64Gzip: "BASE64_GZIP", +} as const; diff --git a/src/api/resources/knowledgebase/types/RoleEnum.ts b/src/api/resources/knowledgebase/types/RoleEnum.ts new file mode 100644 index 000000000..a3341a6e1 --- /dev/null +++ b/src/api/resources/knowledgebase/types/RoleEnum.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `ADMIN` - ADMIN + * * `DEVELOPER` - DEVELOPER + * * `MEMBER` - MEMBER + * * `API` - API + * * `SYSTEM` - SYSTEM + * * `MERGE_TEAM` - MERGE_TEAM + */ +export type RoleEnum = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; +export const RoleEnum = { + Admin: "ADMIN", + Developer: "DEVELOPER", + Member: "MEMBER", + Api: "API", + System: "SYSTEM", + MergeTeam: "MERGE_TEAM", +} as const; diff --git a/src/api/resources/knowledgebase/types/RolesEnum.ts b/src/api/resources/knowledgebase/types/RolesEnum.ts new file mode 100644 index 000000000..837bf965b --- /dev/null +++ b/src/api/resources/knowledgebase/types/RolesEnum.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `READ` - READ + * * `WRITE` - WRITE + * * `OWNER` - OWNER + */ +export type RolesEnum = "READ" | "WRITE" | "OWNER"; +export const RolesEnum = { + Read: "READ", + Write: "WRITE", + Owner: "OWNER", +} as const; diff --git a/src/api/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/api/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts new file mode 100644 index 000000000..473a4c15e --- /dev/null +++ b/src/api/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * * `IN_LAST_SYNC` - IN_LAST_SYNC + */ +export type SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; +export const SelectiveSyncConfigurationsUsageEnum = { + InNextSync: "IN_NEXT_SYNC", + InLastSync: "IN_LAST_SYNC", +} as const; diff --git a/src/api/resources/knowledgebase/types/Status3C6Enum.ts b/src/api/resources/knowledgebase/types/Status3C6Enum.ts new file mode 100644 index 000000000..5aee90cc4 --- /dev/null +++ b/src/api/resources/knowledgebase/types/Status3C6Enum.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `DRAFT` - DRAFT + * * `PUBLISHED` - PUBLISHED + * * `ARCHIVED` - ARCHIVED + * * `TRASH` - TRASH + */ +export type Status3C6Enum = "DRAFT" | "PUBLISHED" | "ARCHIVED" | "TRASH"; +export const Status3C6Enum = { + Draft: "DRAFT", + Published: "PUBLISHED", + Archived: "ARCHIVED", + Trash: "TRASH", +} as const; diff --git a/src/api/resources/knowledgebase/types/StatusFd5Enum.ts b/src/api/resources/knowledgebase/types/StatusFd5Enum.ts new file mode 100644 index 000000000..e8a7a4eec --- /dev/null +++ b/src/api/resources/knowledgebase/types/StatusFd5Enum.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `SYNCING` - SYNCING + * * `DONE` - DONE + * * `FAILED` - FAILED + * * `DISABLED` - DISABLED + * * `PAUSED` - PAUSED + * * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + */ +export type StatusFd5Enum = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; +export const StatusFd5Enum = { + Syncing: "SYNCING", + Done: "DONE", + Failed: "FAILED", + Disabled: "DISABLED", + Paused: "PAUSED", + PartiallySynced: "PARTIALLY_SYNCED", +} as const; diff --git a/src/api/resources/knowledgebase/types/SyncStatus.ts b/src/api/resources/knowledgebase/types/SyncStatus.ts new file mode 100644 index 000000000..24b08733a --- /dev/null +++ b/src/api/resources/knowledgebase/types/SyncStatus.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +/** + * # The SyncStatus Object + * ### Description + * The `SyncStatus` object is used to represent the syncing state of an account + * + * ### Usage Example + * View the `SyncStatus` for an account to see how recently its models were synced. + */ +export interface SyncStatus { + modelName: string; + modelId: string; + lastSyncStart?: Date; + nextSyncStart?: Date; + lastSyncResult?: Merge.knowledgebase.SyncStatusLastSyncResult; + lastSyncFinished?: Date; + status: Merge.knowledgebase.SyncStatusStatus; + isInitialSync: boolean; + selectiveSyncConfigurationsUsage?: Merge.knowledgebase.SelectiveSyncConfigurationsUsageEnum; +} diff --git a/src/api/resources/knowledgebase/types/SyncStatusLastSyncResult.ts b/src/api/resources/knowledgebase/types/SyncStatusLastSyncResult.ts new file mode 100644 index 000000000..3362ad608 --- /dev/null +++ b/src/api/resources/knowledgebase/types/SyncStatusLastSyncResult.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type SyncStatusLastSyncResult = Merge.knowledgebase.LastSyncResultEnum | string; diff --git a/src/api/resources/knowledgebase/types/SyncStatusStatus.ts b/src/api/resources/knowledgebase/types/SyncStatusStatus.ts new file mode 100644 index 000000000..6ee32642a --- /dev/null +++ b/src/api/resources/knowledgebase/types/SyncStatusStatus.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export type SyncStatusStatus = Merge.knowledgebase.StatusFd5Enum | string; diff --git a/src/api/resources/knowledgebase/types/User.ts b/src/api/resources/knowledgebase/types/User.ts new file mode 100644 index 000000000..2849344a8 --- /dev/null +++ b/src/api/resources/knowledgebase/types/User.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * # The User Object + * ### Description + * The `User` object is used to represent a user within the Knowledge Base account. + * ### Usage Example + * Fetch from the `GET /api/knowledgebase/v1/users` endpoint and view their users. + */ +export interface User { + id?: string; + /** The third-party API ID of the matching object. */ + remoteId?: string; + /** The datetime that this object was created by Merge. */ + createdAt?: Date; + /** The datetime that this object was modified by Merge. */ + modifiedAt?: Date; + /** The user's name. */ + name?: string; + /** The user's email address. */ + emailAddress?: 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; +} diff --git a/src/api/resources/knowledgebase/types/ValidationProblemSource.ts b/src/api/resources/knowledgebase/types/ValidationProblemSource.ts new file mode 100644 index 000000000..7f80aa721 --- /dev/null +++ b/src/api/resources/knowledgebase/types/ValidationProblemSource.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ValidationProblemSource { + pointer: string; +} diff --git a/src/api/resources/knowledgebase/types/VisibilityEnum.ts b/src/api/resources/knowledgebase/types/VisibilityEnum.ts new file mode 100644 index 000000000..9eb648e97 --- /dev/null +++ b/src/api/resources/knowledgebase/types/VisibilityEnum.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * * `PUBLIC` - PUBLIC + * * `INTERNAL` - INTERNAL + * * `RESTRICTED` - RESTRICTED + */ +export type VisibilityEnum = "PUBLIC" | "INTERNAL" | "RESTRICTED"; +export const VisibilityEnum = { + Public: "PUBLIC", + Internal: "INTERNAL", + Restricted: "RESTRICTED", +} as const; diff --git a/src/api/resources/knowledgebase/types/WarningValidationProblem.ts b/src/api/resources/knowledgebase/types/WarningValidationProblem.ts new file mode 100644 index 000000000..ee790b45f --- /dev/null +++ b/src/api/resources/knowledgebase/types/WarningValidationProblem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Merge from "../../../index"; + +export interface WarningValidationProblem { + source?: Merge.knowledgebase.ValidationProblemSource; + title: string; + detail: string; + problemType: string; +} diff --git a/src/api/resources/knowledgebase/types/WebhookReceiver.ts b/src/api/resources/knowledgebase/types/WebhookReceiver.ts new file mode 100644 index 000000000..9f5b791e2 --- /dev/null +++ b/src/api/resources/knowledgebase/types/WebhookReceiver.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface WebhookReceiver { + event: string; + isActive: boolean; + key?: string; +} diff --git a/src/api/resources/knowledgebase/types/index.ts b/src/api/resources/knowledgebase/types/index.ts new file mode 100644 index 000000000..adc5d3eca --- /dev/null +++ b/src/api/resources/knowledgebase/types/index.ts @@ -0,0 +1,113 @@ +export * from "./AccountDetailsCategory"; +export * from "./AccountDetails"; +export * from "./AccountDetailsAndActionsCategory"; +export * from "./AccountDetailsAndActionsStatus"; +export * from "./AccountDetailsAndActions"; +export * from "./AccountDetailsAndActionsIntegration"; +export * from "./AccountDetailsAndActionsStatusEnum"; +export * from "./AccountIntegration"; +export * from "./AccountToken"; +export * from "./AdvancedMetadata"; +export * from "./ArticleAuthor"; +export * from "./ArticleLastEditedBy"; +export * from "./ArticleVisibility"; +export * from "./ArticleStatus"; +export * from "./ArticleType"; +export * from "./ArticleParentArticle"; +export * from "./ArticleParentContainer"; +export * from "./ArticleRootContainer"; +export * from "./ArticlePermissionsItem"; +export * from "./ArticleAttachmentsItem"; +export * from "./Article"; +export * from "./ArticleTypeEnum"; +export * from "./AsyncPassthroughReciept"; +export * from "./Attachment"; +export * from "./AuditLogEventRole"; +export * from "./AuditLogEventEventType"; +export * from "./AuditLogEvent"; +export * from "./AvailableActions"; +export * from "./CategoriesEnum"; +export * from "./CategoryEnum"; +export * from "./CommonModelScopeApi"; +export * from "./CommonModelScopesBodyRequest"; +export * from "./CompletedAccountInitialScreenEnum"; +export * from "./ContainerStatus"; +export * from "./ContainerType"; +export * from "./ContainerVisibility"; +export * from "./ContainerPermissionsItem"; +export * from "./Container"; +export * from "./ContainerTypeEnum"; +export * from "./DataPassthroughRequestMethod"; +export * from "./DataPassthroughRequestRequestFormat"; +export * from "./DataPassthroughRequest"; +export * from "./DebugModeLog"; +export * from "./DebugModelLogSummary"; +export * from "./EnabledActionsEnum"; +export * from "./EncodingEnum"; +export * from "./ErrorValidationProblem"; +export * from "./EventTypeEnum"; +export * from "./ExternalTargetFieldApi"; +export * from "./ExternalTargetFieldApiResponse"; +export * from "./FieldMappingApiInstanceTargetField"; +export * from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; +export * from "./FieldMappingApiInstanceRemoteField"; +export * from "./FieldMappingApiInstance"; +export * from "./FieldMappingApiInstanceResponse"; +export * from "./FieldMappingInstanceResponse"; +export * from "./FieldPermissionDeserializer"; +export * from "./FieldPermissionDeserializerRequest"; +export * from "./GroupParentGroup"; +export * from "./GroupUsersItem"; +export * from "./Group"; +export * from "./IndividualCommonModelScopeDeserializer"; +export * from "./IndividualCommonModelScopeDeserializerRequest"; +export * from "./IssueStatus"; +export * from "./Issue"; +export * from "./IssueStatusEnum"; +export * from "./LanguageEnum"; +export * from "./LastSyncResultEnum"; +export * from "./LinkToken"; +export * from "./MethodEnum"; +export * from "./ModelOperation"; +export * from "./ModelPermissionDeserializer"; +export * from "./ModelPermissionDeserializerRequest"; +export * from "./MultipartFormFieldRequestEncoding"; +export * from "./MultipartFormFieldRequest"; +export * from "./PaginatedAccountDetailsAndActionsList"; +export * from "./PaginatedArticleList"; +export * from "./PaginatedAttachmentList"; +export * from "./PaginatedAuditLogEventList"; +export * from "./PaginatedContainerList"; +export * from "./PaginatedGroupList"; +export * from "./PaginatedIssueList"; +export * from "./PaginatedSyncStatusList"; +export * from "./PaginatedUserList"; +export * from "./PermissionUser"; +export * from "./PermissionGroup"; +export * from "./PermissionType"; +export * from "./Permission"; +export * from "./PermissionTypeEnum"; +export * from "./RemoteData"; +export * from "./RemoteEndpointInfo"; +export * from "./RemoteFieldApiAdvancedMetadata"; +export * from "./RemoteFieldApiCoverage"; +export * from "./RemoteFieldApi"; +export * from "./RemoteFieldApiResponse"; +export * from "./RemoteKey"; +export * from "./RemoteResponseResponseType"; +export * from "./RemoteResponse"; +export * from "./RequestFormatEnum"; +export * from "./ResponseTypeEnum"; +export * from "./RoleEnum"; +export * from "./RolesEnum"; +export * from "./SelectiveSyncConfigurationsUsageEnum"; +export * from "./Status3C6Enum"; +export * from "./StatusFd5Enum"; +export * from "./SyncStatusLastSyncResult"; +export * from "./SyncStatusStatus"; +export * from "./SyncStatus"; +export * from "./User"; +export * from "./ValidationProblemSource"; +export * from "./VisibilityEnum"; +export * from "./WarningValidationProblem"; +export * from "./WebhookReceiver"; diff --git a/src/api/resources/ticketing/resources/collections/client/Client.ts b/src/api/resources/ticketing/resources/collections/client/Client.ts index 0cf23d3f6..b206a8ad0 100644 --- a/src/api/resources/ticketing/resources/collections/client/Client.ts +++ b/src/api/resources/ticketing/resources/collections/client/Client.ts @@ -78,6 +78,7 @@ export class Collections { includeShellData, modifiedAfter, modifiedBefore, + name, pageSize, parentCollectionId, remoteFields, @@ -125,6 +126,10 @@ export class Collections { _queryParams["modified_before"] = modifiedBefore.toISOString(); } + if (name != null) { + _queryParams["name"] = name; + } + if (pageSize != null) { _queryParams["page_size"] = pageSize.toString(); } diff --git a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts index 9cc4d690a..9890906a5 100644 --- a/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts +++ b/src/api/resources/ticketing/resources/collections/client/requests/CollectionsListRequest.ts @@ -29,6 +29,8 @@ export interface CollectionsListRequest { modifiedAfter?: Date; /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; + /** If provided, will only return collections with this name. */ + name?: string; /** Number of results to return per page. */ pageSize?: number; /** If provided, will only return collections whose parent collection matches the given id. */ diff --git a/src/api/resources/ticketing/resources/contacts/client/Client.ts b/src/api/resources/ticketing/resources/contacts/client/Client.ts index 7d62623c3..74c361404 100644 --- a/src/api/resources/ticketing/resources/contacts/client/Client.ts +++ b/src/api/resources/ticketing/resources/contacts/client/Client.ts @@ -71,6 +71,7 @@ export class Contacts { createdAfter, createdBefore, cursor, + emailAddress, expand, includeDeletedData, includeRemoteData, @@ -93,6 +94,10 @@ export class Contacts { _queryParams["cursor"] = cursor; } + if (emailAddress != null) { + _queryParams["email_address"] = emailAddress; + } + if (expand != null) { _queryParams["expand"] = expand; } diff --git a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts index c3edf1fc0..887ed8273 100644 --- a/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts +++ b/src/api/resources/ticketing/resources/contacts/client/requests/ContactsListRequest.ts @@ -15,6 +15,8 @@ export interface ContactsListRequest { createdBefore?: Date; /** The pagination cursor value. */ cursor?: string; + /** If provided, will only return Contacts that match this email. */ + emailAddress?: string; /** Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. */ expand?: "account"; /** Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). */ diff --git a/src/api/resources/ticketing/resources/tickets/client/Client.ts b/src/api/resources/ticketing/resources/tickets/client/Client.ts index 105258442..6843ac9a6 100644 --- a/src/api/resources/ticketing/resources/tickets/client/Client.ts +++ b/src/api/resources/ticketing/resources/tickets/client/Client.ts @@ -87,6 +87,7 @@ export class Tickets { includeShellData, modifiedAfter, modifiedBefore, + name, pageSize, parentTicketId, priority, @@ -181,6 +182,10 @@ export class Tickets { _queryParams["modified_before"] = modifiedBefore.toISOString(); } + if (name != null) { + _queryParams["name"] = name; + } + if (pageSize != null) { _queryParams["page_size"] = pageSize.toString(); } 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 b929b7bdf..1edc0a00d 100644 --- a/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts +++ b/src/api/resources/ticketing/resources/tickets/client/requests/TicketsListRequest.ts @@ -49,6 +49,8 @@ export interface TicketsListRequest { modifiedAfter?: Date; /** If provided, only objects synced by Merge before this date time will be returned. */ modifiedBefore?: Date; + /** If provided, will only return tickets with this name. */ + name?: string; /** Number of results to return per page. */ pageSize?: number; /** If provided, will only return sub tickets of the parent_ticket_id. */ diff --git a/src/api/resources/ticketing/types/Collection.ts b/src/api/resources/ticketing/types/Collection.ts index d206d87a8..86d6a64fa 100644 --- a/src/api/resources/ticketing/types/Collection.ts +++ b/src/api/resources/ticketing/types/Collection.ts @@ -42,6 +42,12 @@ export interface Collection { collectionType?: Merge.ticketing.CollectionCollectionType; /** The parent collection for this collection. */ parentCollection?: Merge.ticketing.CollectionParentCollection; + /** The 3rd party url of the Collection. */ + collectionUrl?: string; + /** When the third party's collection was created. */ + remoteCreatedAt?: Date; + /** When the third party's collection was updated. */ + remoteUpdatedAt?: 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; fieldMappings?: Record; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 7df440533..10989063c 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,6 +1,7 @@ export * as ats from "./ats"; -export * as filestorage from "./filestorage"; export * as crm from "./crm"; +export * as filestorage from "./filestorage"; export * as hris from "./hris"; +export * as knowledgebase from "./knowledgebase"; export * as ticketing from "./ticketing"; export * as accounting from "./accounting"; diff --git a/src/serialization/resources/knowledgebase/index.ts b/src/serialization/resources/knowledgebase/index.ts new file mode 100644 index 000000000..3e15e2907 --- /dev/null +++ b/src/serialization/resources/knowledgebase/index.ts @@ -0,0 +1,2 @@ +export * from "./resources"; +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/articles/index.ts b/src/serialization/resources/knowledgebase/resources/articles/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/articles/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts new file mode 100644 index 000000000..105c66200 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesListRequestExpand.ts @@ -0,0 +1,271 @@ +/** + * 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"; + +export const ArticlesListRequestExpand: core.serialization.Schema< + serializers.knowledgebase.ArticlesListRequestExpand.Raw, + Merge.knowledgebase.ArticlesListRequestExpand +> = core.serialization.enum_([ + "attachments", + "attachments,author", + "attachments,author,last_edited_by", + "attachments,author,last_edited_by,parent_article", + "attachments,author,last_edited_by,parent_article,parent_container", + "attachments,author,last_edited_by,parent_article,parent_container,root_container", + "attachments,author,last_edited_by,parent_article,root_container", + "attachments,author,last_edited_by,parent_container", + "attachments,author,last_edited_by,parent_container,root_container", + "attachments,author,last_edited_by,root_container", + "attachments,author,parent_article", + "attachments,author,parent_article,parent_container", + "attachments,author,parent_article,parent_container,root_container", + "attachments,author,parent_article,root_container", + "attachments,author,parent_container", + "attachments,author,parent_container,root_container", + "attachments,author,root_container", + "attachments,last_edited_by", + "attachments,last_edited_by,parent_article", + "attachments,last_edited_by,parent_article,parent_container", + "attachments,last_edited_by,parent_article,parent_container,root_container", + "attachments,last_edited_by,parent_article,root_container", + "attachments,last_edited_by,parent_container", + "attachments,last_edited_by,parent_container,root_container", + "attachments,last_edited_by,root_container", + "attachments,parent_article", + "attachments,parent_article,parent_container", + "attachments,parent_article,parent_container,root_container", + "attachments,parent_article,root_container", + "attachments,parent_container", + "attachments,parent_container,root_container", + "attachments,root_container", + "author", + "author,last_edited_by", + "author,last_edited_by,parent_article", + "author,last_edited_by,parent_article,parent_container", + "author,last_edited_by,parent_article,parent_container,root_container", + "author,last_edited_by,parent_article,root_container", + "author,last_edited_by,parent_container", + "author,last_edited_by,parent_container,root_container", + "author,last_edited_by,root_container", + "author,parent_article", + "author,parent_article,parent_container", + "author,parent_article,parent_container,root_container", + "author,parent_article,root_container", + "author,parent_container", + "author,parent_container,root_container", + "author,root_container", + "last_edited_by", + "last_edited_by,parent_article", + "last_edited_by,parent_article,parent_container", + "last_edited_by,parent_article,parent_container,root_container", + "last_edited_by,parent_article,root_container", + "last_edited_by,parent_container", + "last_edited_by,parent_container,root_container", + "last_edited_by,root_container", + "parent_article", + "parent_article,parent_container", + "parent_article,parent_container,root_container", + "parent_article,root_container", + "parent_container", + "parent_container,root_container", + "permissions", + "permissions,attachments", + "permissions,attachments,author", + "permissions,attachments,author,last_edited_by", + "permissions,attachments,author,last_edited_by,parent_article", + "permissions,attachments,author,last_edited_by,parent_article,parent_container", + "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container", + "permissions,attachments,author,last_edited_by,parent_article,root_container", + "permissions,attachments,author,last_edited_by,parent_container", + "permissions,attachments,author,last_edited_by,parent_container,root_container", + "permissions,attachments,author,last_edited_by,root_container", + "permissions,attachments,author,parent_article", + "permissions,attachments,author,parent_article,parent_container", + "permissions,attachments,author,parent_article,parent_container,root_container", + "permissions,attachments,author,parent_article,root_container", + "permissions,attachments,author,parent_container", + "permissions,attachments,author,parent_container,root_container", + "permissions,attachments,author,root_container", + "permissions,attachments,last_edited_by", + "permissions,attachments,last_edited_by,parent_article", + "permissions,attachments,last_edited_by,parent_article,parent_container", + "permissions,attachments,last_edited_by,parent_article,parent_container,root_container", + "permissions,attachments,last_edited_by,parent_article,root_container", + "permissions,attachments,last_edited_by,parent_container", + "permissions,attachments,last_edited_by,parent_container,root_container", + "permissions,attachments,last_edited_by,root_container", + "permissions,attachments,parent_article", + "permissions,attachments,parent_article,parent_container", + "permissions,attachments,parent_article,parent_container,root_container", + "permissions,attachments,parent_article,root_container", + "permissions,attachments,parent_container", + "permissions,attachments,parent_container,root_container", + "permissions,attachments,root_container", + "permissions,author", + "permissions,author,last_edited_by", + "permissions,author,last_edited_by,parent_article", + "permissions,author,last_edited_by,parent_article,parent_container", + "permissions,author,last_edited_by,parent_article,parent_container,root_container", + "permissions,author,last_edited_by,parent_article,root_container", + "permissions,author,last_edited_by,parent_container", + "permissions,author,last_edited_by,parent_container,root_container", + "permissions,author,last_edited_by,root_container", + "permissions,author,parent_article", + "permissions,author,parent_article,parent_container", + "permissions,author,parent_article,parent_container,root_container", + "permissions,author,parent_article,root_container", + "permissions,author,parent_container", + "permissions,author,parent_container,root_container", + "permissions,author,root_container", + "permissions,last_edited_by", + "permissions,last_edited_by,parent_article", + "permissions,last_edited_by,parent_article,parent_container", + "permissions,last_edited_by,parent_article,parent_container,root_container", + "permissions,last_edited_by,parent_article,root_container", + "permissions,last_edited_by,parent_container", + "permissions,last_edited_by,parent_container,root_container", + "permissions,last_edited_by,root_container", + "permissions,parent_article", + "permissions,parent_article,parent_container", + "permissions,parent_article,parent_container,root_container", + "permissions,parent_article,root_container", + "permissions,parent_container", + "permissions,parent_container,root_container", + "permissions,root_container", + "root_container", +]); + +export declare namespace ArticlesListRequestExpand { + export type Raw = + | "attachments" + | "attachments,author" + | "attachments,author,last_edited_by" + | "attachments,author,last_edited_by,parent_article" + | "attachments,author,last_edited_by,parent_article,parent_container" + | "attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "attachments,author,last_edited_by,parent_article,root_container" + | "attachments,author,last_edited_by,parent_container" + | "attachments,author,last_edited_by,parent_container,root_container" + | "attachments,author,last_edited_by,root_container" + | "attachments,author,parent_article" + | "attachments,author,parent_article,parent_container" + | "attachments,author,parent_article,parent_container,root_container" + | "attachments,author,parent_article,root_container" + | "attachments,author,parent_container" + | "attachments,author,parent_container,root_container" + | "attachments,author,root_container" + | "attachments,last_edited_by" + | "attachments,last_edited_by,parent_article" + | "attachments,last_edited_by,parent_article,parent_container" + | "attachments,last_edited_by,parent_article,parent_container,root_container" + | "attachments,last_edited_by,parent_article,root_container" + | "attachments,last_edited_by,parent_container" + | "attachments,last_edited_by,parent_container,root_container" + | "attachments,last_edited_by,root_container" + | "attachments,parent_article" + | "attachments,parent_article,parent_container" + | "attachments,parent_article,parent_container,root_container" + | "attachments,parent_article,root_container" + | "attachments,parent_container" + | "attachments,parent_container,root_container" + | "attachments,root_container" + | "author" + | "author,last_edited_by" + | "author,last_edited_by,parent_article" + | "author,last_edited_by,parent_article,parent_container" + | "author,last_edited_by,parent_article,parent_container,root_container" + | "author,last_edited_by,parent_article,root_container" + | "author,last_edited_by,parent_container" + | "author,last_edited_by,parent_container,root_container" + | "author,last_edited_by,root_container" + | "author,parent_article" + | "author,parent_article,parent_container" + | "author,parent_article,parent_container,root_container" + | "author,parent_article,root_container" + | "author,parent_container" + | "author,parent_container,root_container" + | "author,root_container" + | "last_edited_by" + | "last_edited_by,parent_article" + | "last_edited_by,parent_article,parent_container" + | "last_edited_by,parent_article,parent_container,root_container" + | "last_edited_by,parent_article,root_container" + | "last_edited_by,parent_container" + | "last_edited_by,parent_container,root_container" + | "last_edited_by,root_container" + | "parent_article" + | "parent_article,parent_container" + | "parent_article,parent_container,root_container" + | "parent_article,root_container" + | "parent_container" + | "parent_container,root_container" + | "permissions" + | "permissions,attachments" + | "permissions,attachments,author" + | "permissions,attachments,author,last_edited_by" + | "permissions,attachments,author,last_edited_by,parent_article" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,parent_article,root_container" + | "permissions,attachments,author,last_edited_by,parent_container" + | "permissions,attachments,author,last_edited_by,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,root_container" + | "permissions,attachments,author,parent_article" + | "permissions,attachments,author,parent_article,parent_container" + | "permissions,attachments,author,parent_article,parent_container,root_container" + | "permissions,attachments,author,parent_article,root_container" + | "permissions,attachments,author,parent_container" + | "permissions,attachments,author,parent_container,root_container" + | "permissions,attachments,author,root_container" + | "permissions,attachments,last_edited_by" + | "permissions,attachments,last_edited_by,parent_article" + | "permissions,attachments,last_edited_by,parent_article,parent_container" + | "permissions,attachments,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,last_edited_by,parent_article,root_container" + | "permissions,attachments,last_edited_by,parent_container" + | "permissions,attachments,last_edited_by,parent_container,root_container" + | "permissions,attachments,last_edited_by,root_container" + | "permissions,attachments,parent_article" + | "permissions,attachments,parent_article,parent_container" + | "permissions,attachments,parent_article,parent_container,root_container" + | "permissions,attachments,parent_article,root_container" + | "permissions,attachments,parent_container" + | "permissions,attachments,parent_container,root_container" + | "permissions,attachments,root_container" + | "permissions,author" + | "permissions,author,last_edited_by" + | "permissions,author,last_edited_by,parent_article" + | "permissions,author,last_edited_by,parent_article,parent_container" + | "permissions,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,author,last_edited_by,parent_article,root_container" + | "permissions,author,last_edited_by,parent_container" + | "permissions,author,last_edited_by,parent_container,root_container" + | "permissions,author,last_edited_by,root_container" + | "permissions,author,parent_article" + | "permissions,author,parent_article,parent_container" + | "permissions,author,parent_article,parent_container,root_container" + | "permissions,author,parent_article,root_container" + | "permissions,author,parent_container" + | "permissions,author,parent_container,root_container" + | "permissions,author,root_container" + | "permissions,last_edited_by" + | "permissions,last_edited_by,parent_article" + | "permissions,last_edited_by,parent_article,parent_container" + | "permissions,last_edited_by,parent_article,parent_container,root_container" + | "permissions,last_edited_by,parent_article,root_container" + | "permissions,last_edited_by,parent_container" + | "permissions,last_edited_by,parent_container,root_container" + | "permissions,last_edited_by,root_container" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_article,parent_container,root_container" + | "permissions,parent_article,root_container" + | "permissions,parent_container" + | "permissions,parent_container,root_container" + | "permissions,root_container" + | "root_container"; +} diff --git a/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts new file mode 100644 index 000000000..652eb5fe4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/articles/types/ArticlesRetrieveRequestExpand.ts @@ -0,0 +1,271 @@ +/** + * 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"; + +export const ArticlesRetrieveRequestExpand: core.serialization.Schema< + serializers.knowledgebase.ArticlesRetrieveRequestExpand.Raw, + Merge.knowledgebase.ArticlesRetrieveRequestExpand +> = core.serialization.enum_([ + "attachments", + "attachments,author", + "attachments,author,last_edited_by", + "attachments,author,last_edited_by,parent_article", + "attachments,author,last_edited_by,parent_article,parent_container", + "attachments,author,last_edited_by,parent_article,parent_container,root_container", + "attachments,author,last_edited_by,parent_article,root_container", + "attachments,author,last_edited_by,parent_container", + "attachments,author,last_edited_by,parent_container,root_container", + "attachments,author,last_edited_by,root_container", + "attachments,author,parent_article", + "attachments,author,parent_article,parent_container", + "attachments,author,parent_article,parent_container,root_container", + "attachments,author,parent_article,root_container", + "attachments,author,parent_container", + "attachments,author,parent_container,root_container", + "attachments,author,root_container", + "attachments,last_edited_by", + "attachments,last_edited_by,parent_article", + "attachments,last_edited_by,parent_article,parent_container", + "attachments,last_edited_by,parent_article,parent_container,root_container", + "attachments,last_edited_by,parent_article,root_container", + "attachments,last_edited_by,parent_container", + "attachments,last_edited_by,parent_container,root_container", + "attachments,last_edited_by,root_container", + "attachments,parent_article", + "attachments,parent_article,parent_container", + "attachments,parent_article,parent_container,root_container", + "attachments,parent_article,root_container", + "attachments,parent_container", + "attachments,parent_container,root_container", + "attachments,root_container", + "author", + "author,last_edited_by", + "author,last_edited_by,parent_article", + "author,last_edited_by,parent_article,parent_container", + "author,last_edited_by,parent_article,parent_container,root_container", + "author,last_edited_by,parent_article,root_container", + "author,last_edited_by,parent_container", + "author,last_edited_by,parent_container,root_container", + "author,last_edited_by,root_container", + "author,parent_article", + "author,parent_article,parent_container", + "author,parent_article,parent_container,root_container", + "author,parent_article,root_container", + "author,parent_container", + "author,parent_container,root_container", + "author,root_container", + "last_edited_by", + "last_edited_by,parent_article", + "last_edited_by,parent_article,parent_container", + "last_edited_by,parent_article,parent_container,root_container", + "last_edited_by,parent_article,root_container", + "last_edited_by,parent_container", + "last_edited_by,parent_container,root_container", + "last_edited_by,root_container", + "parent_article", + "parent_article,parent_container", + "parent_article,parent_container,root_container", + "parent_article,root_container", + "parent_container", + "parent_container,root_container", + "permissions", + "permissions,attachments", + "permissions,attachments,author", + "permissions,attachments,author,last_edited_by", + "permissions,attachments,author,last_edited_by,parent_article", + "permissions,attachments,author,last_edited_by,parent_article,parent_container", + "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container", + "permissions,attachments,author,last_edited_by,parent_article,root_container", + "permissions,attachments,author,last_edited_by,parent_container", + "permissions,attachments,author,last_edited_by,parent_container,root_container", + "permissions,attachments,author,last_edited_by,root_container", + "permissions,attachments,author,parent_article", + "permissions,attachments,author,parent_article,parent_container", + "permissions,attachments,author,parent_article,parent_container,root_container", + "permissions,attachments,author,parent_article,root_container", + "permissions,attachments,author,parent_container", + "permissions,attachments,author,parent_container,root_container", + "permissions,attachments,author,root_container", + "permissions,attachments,last_edited_by", + "permissions,attachments,last_edited_by,parent_article", + "permissions,attachments,last_edited_by,parent_article,parent_container", + "permissions,attachments,last_edited_by,parent_article,parent_container,root_container", + "permissions,attachments,last_edited_by,parent_article,root_container", + "permissions,attachments,last_edited_by,parent_container", + "permissions,attachments,last_edited_by,parent_container,root_container", + "permissions,attachments,last_edited_by,root_container", + "permissions,attachments,parent_article", + "permissions,attachments,parent_article,parent_container", + "permissions,attachments,parent_article,parent_container,root_container", + "permissions,attachments,parent_article,root_container", + "permissions,attachments,parent_container", + "permissions,attachments,parent_container,root_container", + "permissions,attachments,root_container", + "permissions,author", + "permissions,author,last_edited_by", + "permissions,author,last_edited_by,parent_article", + "permissions,author,last_edited_by,parent_article,parent_container", + "permissions,author,last_edited_by,parent_article,parent_container,root_container", + "permissions,author,last_edited_by,parent_article,root_container", + "permissions,author,last_edited_by,parent_container", + "permissions,author,last_edited_by,parent_container,root_container", + "permissions,author,last_edited_by,root_container", + "permissions,author,parent_article", + "permissions,author,parent_article,parent_container", + "permissions,author,parent_article,parent_container,root_container", + "permissions,author,parent_article,root_container", + "permissions,author,parent_container", + "permissions,author,parent_container,root_container", + "permissions,author,root_container", + "permissions,last_edited_by", + "permissions,last_edited_by,parent_article", + "permissions,last_edited_by,parent_article,parent_container", + "permissions,last_edited_by,parent_article,parent_container,root_container", + "permissions,last_edited_by,parent_article,root_container", + "permissions,last_edited_by,parent_container", + "permissions,last_edited_by,parent_container,root_container", + "permissions,last_edited_by,root_container", + "permissions,parent_article", + "permissions,parent_article,parent_container", + "permissions,parent_article,parent_container,root_container", + "permissions,parent_article,root_container", + "permissions,parent_container", + "permissions,parent_container,root_container", + "permissions,root_container", + "root_container", +]); + +export declare namespace ArticlesRetrieveRequestExpand { + export type Raw = + | "attachments" + | "attachments,author" + | "attachments,author,last_edited_by" + | "attachments,author,last_edited_by,parent_article" + | "attachments,author,last_edited_by,parent_article,parent_container" + | "attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "attachments,author,last_edited_by,parent_article,root_container" + | "attachments,author,last_edited_by,parent_container" + | "attachments,author,last_edited_by,parent_container,root_container" + | "attachments,author,last_edited_by,root_container" + | "attachments,author,parent_article" + | "attachments,author,parent_article,parent_container" + | "attachments,author,parent_article,parent_container,root_container" + | "attachments,author,parent_article,root_container" + | "attachments,author,parent_container" + | "attachments,author,parent_container,root_container" + | "attachments,author,root_container" + | "attachments,last_edited_by" + | "attachments,last_edited_by,parent_article" + | "attachments,last_edited_by,parent_article,parent_container" + | "attachments,last_edited_by,parent_article,parent_container,root_container" + | "attachments,last_edited_by,parent_article,root_container" + | "attachments,last_edited_by,parent_container" + | "attachments,last_edited_by,parent_container,root_container" + | "attachments,last_edited_by,root_container" + | "attachments,parent_article" + | "attachments,parent_article,parent_container" + | "attachments,parent_article,parent_container,root_container" + | "attachments,parent_article,root_container" + | "attachments,parent_container" + | "attachments,parent_container,root_container" + | "attachments,root_container" + | "author" + | "author,last_edited_by" + | "author,last_edited_by,parent_article" + | "author,last_edited_by,parent_article,parent_container" + | "author,last_edited_by,parent_article,parent_container,root_container" + | "author,last_edited_by,parent_article,root_container" + | "author,last_edited_by,parent_container" + | "author,last_edited_by,parent_container,root_container" + | "author,last_edited_by,root_container" + | "author,parent_article" + | "author,parent_article,parent_container" + | "author,parent_article,parent_container,root_container" + | "author,parent_article,root_container" + | "author,parent_container" + | "author,parent_container,root_container" + | "author,root_container" + | "last_edited_by" + | "last_edited_by,parent_article" + | "last_edited_by,parent_article,parent_container" + | "last_edited_by,parent_article,parent_container,root_container" + | "last_edited_by,parent_article,root_container" + | "last_edited_by,parent_container" + | "last_edited_by,parent_container,root_container" + | "last_edited_by,root_container" + | "parent_article" + | "parent_article,parent_container" + | "parent_article,parent_container,root_container" + | "parent_article,root_container" + | "parent_container" + | "parent_container,root_container" + | "permissions" + | "permissions,attachments" + | "permissions,attachments,author" + | "permissions,attachments,author,last_edited_by" + | "permissions,attachments,author,last_edited_by,parent_article" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container" + | "permissions,attachments,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,parent_article,root_container" + | "permissions,attachments,author,last_edited_by,parent_container" + | "permissions,attachments,author,last_edited_by,parent_container,root_container" + | "permissions,attachments,author,last_edited_by,root_container" + | "permissions,attachments,author,parent_article" + | "permissions,attachments,author,parent_article,parent_container" + | "permissions,attachments,author,parent_article,parent_container,root_container" + | "permissions,attachments,author,parent_article,root_container" + | "permissions,attachments,author,parent_container" + | "permissions,attachments,author,parent_container,root_container" + | "permissions,attachments,author,root_container" + | "permissions,attachments,last_edited_by" + | "permissions,attachments,last_edited_by,parent_article" + | "permissions,attachments,last_edited_by,parent_article,parent_container" + | "permissions,attachments,last_edited_by,parent_article,parent_container,root_container" + | "permissions,attachments,last_edited_by,parent_article,root_container" + | "permissions,attachments,last_edited_by,parent_container" + | "permissions,attachments,last_edited_by,parent_container,root_container" + | "permissions,attachments,last_edited_by,root_container" + | "permissions,attachments,parent_article" + | "permissions,attachments,parent_article,parent_container" + | "permissions,attachments,parent_article,parent_container,root_container" + | "permissions,attachments,parent_article,root_container" + | "permissions,attachments,parent_container" + | "permissions,attachments,parent_container,root_container" + | "permissions,attachments,root_container" + | "permissions,author" + | "permissions,author,last_edited_by" + | "permissions,author,last_edited_by,parent_article" + | "permissions,author,last_edited_by,parent_article,parent_container" + | "permissions,author,last_edited_by,parent_article,parent_container,root_container" + | "permissions,author,last_edited_by,parent_article,root_container" + | "permissions,author,last_edited_by,parent_container" + | "permissions,author,last_edited_by,parent_container,root_container" + | "permissions,author,last_edited_by,root_container" + | "permissions,author,parent_article" + | "permissions,author,parent_article,parent_container" + | "permissions,author,parent_article,parent_container,root_container" + | "permissions,author,parent_article,root_container" + | "permissions,author,parent_container" + | "permissions,author,parent_container,root_container" + | "permissions,author,root_container" + | "permissions,last_edited_by" + | "permissions,last_edited_by,parent_article" + | "permissions,last_edited_by,parent_article,parent_container" + | "permissions,last_edited_by,parent_article,parent_container,root_container" + | "permissions,last_edited_by,parent_article,root_container" + | "permissions,last_edited_by,parent_container" + | "permissions,last_edited_by,parent_container,root_container" + | "permissions,last_edited_by,root_container" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_article,parent_container,root_container" + | "permissions,parent_article,root_container" + | "permissions,parent_container" + | "permissions,parent_container,root_container" + | "permissions,root_container" + | "root_container"; +} diff --git a/src/serialization/resources/knowledgebase/resources/articles/types/index.ts b/src/serialization/resources/knowledgebase/resources/articles/types/index.ts new file mode 100644 index 000000000..91a0978bc --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/articles/types/index.ts @@ -0,0 +1,2 @@ +export * from "./ArticlesListRequestExpand"; +export * from "./ArticlesRetrieveRequestExpand"; diff --git a/src/serialization/resources/knowledgebase/resources/asyncPassthrough/index.ts b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.ts new file mode 100644 index 000000000..98189a29b --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/AsyncPassthroughRetrieveResponse.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 { RemoteResponse } from "../../../types/RemoteResponse"; + +export const AsyncPassthroughRetrieveResponse: core.serialization.Schema< + serializers.knowledgebase.AsyncPassthroughRetrieveResponse.Raw, + Merge.knowledgebase.AsyncPassthroughRetrieveResponse +> = core.serialization.undiscriminatedUnion([RemoteResponse, core.serialization.string()]); + +export declare namespace AsyncPassthroughRetrieveResponse { + export type Raw = RemoteResponse.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/index.ts b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/index.ts new file mode 100644 index 000000000..f2b2d0e21 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/asyncPassthrough/types/index.ts @@ -0,0 +1 @@ +export * from "./AsyncPassthroughRetrieveResponse"; diff --git a/src/serialization/resources/knowledgebase/resources/containers/index.ts b/src/serialization/resources/knowledgebase/resources/containers/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/containers/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts new file mode 100644 index 000000000..212606cfb --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/containers/types/ContainersListRequestExpand.ts @@ -0,0 +1,31 @@ +/** + * 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"; + +export const ContainersListRequestExpand: core.serialization.Schema< + serializers.knowledgebase.ContainersListRequestExpand.Raw, + Merge.knowledgebase.ContainersListRequestExpand +> = core.serialization.enum_([ + "parent_article", + "parent_article,parent_container", + "parent_container", + "permissions", + "permissions,parent_article", + "permissions,parent_article,parent_container", + "permissions,parent_container", +]); + +export declare namespace ContainersListRequestExpand { + export type Raw = + | "parent_article" + | "parent_article,parent_container" + | "parent_container" + | "permissions" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_container"; +} diff --git a/src/serialization/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts new file mode 100644 index 000000000..6e7922c60 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/containers/types/ContainersRetrieveRequestExpand.ts @@ -0,0 +1,31 @@ +/** + * 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"; + +export const ContainersRetrieveRequestExpand: core.serialization.Schema< + serializers.knowledgebase.ContainersRetrieveRequestExpand.Raw, + Merge.knowledgebase.ContainersRetrieveRequestExpand +> = core.serialization.enum_([ + "parent_article", + "parent_article,parent_container", + "parent_container", + "permissions", + "permissions,parent_article", + "permissions,parent_article,parent_container", + "permissions,parent_container", +]); + +export declare namespace ContainersRetrieveRequestExpand { + export type Raw = + | "parent_article" + | "parent_article,parent_container" + | "parent_container" + | "permissions" + | "permissions,parent_article" + | "permissions,parent_article,parent_container" + | "permissions,parent_container"; +} diff --git a/src/serialization/resources/knowledgebase/resources/containers/types/index.ts b/src/serialization/resources/knowledgebase/resources/containers/types/index.ts new file mode 100644 index 000000000..4a151c0c4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/containers/types/index.ts @@ -0,0 +1,2 @@ +export * from "./ContainersListRequestExpand"; +export * from "./ContainersRetrieveRequestExpand"; diff --git a/src/serialization/resources/knowledgebase/resources/fieldMapping/client/index.ts b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts new file mode 100644 index 000000000..88983ac93 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/CreateFieldMappingRequest.ts @@ -0,0 +1,35 @@ +/** + * 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"; + +export const CreateFieldMappingRequest: core.serialization.Schema< + serializers.knowledgebase.CreateFieldMappingRequest.Raw, + Omit +> = core.serialization.object({ + targetFieldName: core.serialization.property("target_field_name", core.serialization.string()), + targetFieldDescription: core.serialization.property("target_field_description", core.serialization.string()), + remoteFieldTraversalPath: core.serialization.property( + "remote_field_traversal_path", + core.serialization.list(core.serialization.unknown()), + ), + remoteMethod: core.serialization.property("remote_method", core.serialization.string()), + remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string()), + commonModelName: core.serialization.property("common_model_name", core.serialization.string()), + jmesPath: core.serialization.property("jmes_path", core.serialization.string().optional()), +}); + +export declare namespace CreateFieldMappingRequest { + export interface Raw { + target_field_name: string; + target_field_description: string; + remote_field_traversal_path: unknown[]; + remote_method: string; + remote_url_path: string; + common_model_name: string; + jmes_path?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts new file mode 100644 index 000000000..4688858ce --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/PatchedEditFieldMappingRequest.ts @@ -0,0 +1,29 @@ +/** + * 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"; + +export const PatchedEditFieldMappingRequest: core.serialization.Schema< + serializers.knowledgebase.PatchedEditFieldMappingRequest.Raw, + Merge.knowledgebase.PatchedEditFieldMappingRequest +> = core.serialization.object({ + remoteFieldTraversalPath: core.serialization.property( + "remote_field_traversal_path", + core.serialization.list(core.serialization.unknown()).optional(), + ), + remoteMethod: core.serialization.property("remote_method", core.serialization.string().optional()), + remoteUrlPath: core.serialization.property("remote_url_path", core.serialization.string().optional()), + jmesPath: core.serialization.property("jmes_path", core.serialization.string().optional()), +}); + +export declare namespace PatchedEditFieldMappingRequest { + export interface Raw { + remote_field_traversal_path?: unknown[] | null; + remote_method?: string | null; + remote_url_path?: string | null; + jmes_path?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts new file mode 100644 index 000000000..9bb691d70 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/fieldMapping/client/requests/index.ts @@ -0,0 +1,2 @@ +export { CreateFieldMappingRequest } from "./CreateFieldMappingRequest"; +export { PatchedEditFieldMappingRequest } from "./PatchedEditFieldMappingRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/fieldMapping/index.ts b/src/serialization/resources/knowledgebase/resources/fieldMapping/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/fieldMapping/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/forceResync/client/index.ts b/src/serialization/resources/knowledgebase/resources/forceResync/client/index.ts new file mode 100644 index 000000000..d5680837c --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/forceResync/client/index.ts @@ -0,0 +1 @@ +export * as syncStatusResyncCreate from "./syncStatusResyncCreate"; diff --git a/src/serialization/resources/knowledgebase/resources/forceResync/client/syncStatusResyncCreate.ts b/src/serialization/resources/knowledgebase/resources/forceResync/client/syncStatusResyncCreate.ts new file mode 100644 index 000000000..d2979725f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/forceResync/client/syncStatusResyncCreate.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 { SyncStatus } from "../../../types/SyncStatus"; + +export const Response: core.serialization.Schema< + serializers.knowledgebase.forceResync.syncStatusResyncCreate.Response.Raw, + Merge.knowledgebase.SyncStatus[] +> = core.serialization.list(SyncStatus); + +export declare namespace Response { + export type Raw = SyncStatus.Raw[]; +} diff --git a/src/serialization/resources/knowledgebase/resources/forceResync/index.ts b/src/serialization/resources/knowledgebase/resources/forceResync/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/forceResync/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/generateKey/client/index.ts b/src/serialization/resources/knowledgebase/resources/generateKey/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/generateKey/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts b/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts new file mode 100644 index 000000000..8b2d9cfa6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/GenerateRemoteKeyRequest.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const GenerateRemoteKeyRequest: core.serialization.Schema< + serializers.knowledgebase.GenerateRemoteKeyRequest.Raw, + Merge.knowledgebase.GenerateRemoteKeyRequest +> = core.serialization.object({ + name: core.serialization.string(), +}); + +export declare namespace GenerateRemoteKeyRequest { + export interface Raw { + name: string; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/index.ts new file mode 100644 index 000000000..0df6e7c8b --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/generateKey/client/requests/index.ts @@ -0,0 +1 @@ +export { GenerateRemoteKeyRequest } from "./GenerateRemoteKeyRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/generateKey/index.ts b/src/serialization/resources/knowledgebase/resources/generateKey/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/generateKey/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/groups/index.ts b/src/serialization/resources/knowledgebase/resources/groups/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/groups/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts new file mode 100644 index 000000000..c3660d96d --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/groups/types/GroupsListRequestExpand.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const GroupsListRequestExpand: core.serialization.Schema< + serializers.knowledgebase.GroupsListRequestExpand.Raw, + Merge.knowledgebase.GroupsListRequestExpand +> = core.serialization.enum_(["parent_group", "users", "users,parent_group"]); + +export declare namespace GroupsListRequestExpand { + export type Raw = "parent_group" | "users" | "users,parent_group"; +} diff --git a/src/serialization/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts b/src/serialization/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts new file mode 100644 index 000000000..cee98a1ef --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/groups/types/GroupsRetrieveRequestExpand.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const GroupsRetrieveRequestExpand: core.serialization.Schema< + serializers.knowledgebase.GroupsRetrieveRequestExpand.Raw, + Merge.knowledgebase.GroupsRetrieveRequestExpand +> = core.serialization.enum_(["parent_group", "users", "users,parent_group"]); + +export declare namespace GroupsRetrieveRequestExpand { + export type Raw = "parent_group" | "users" | "users,parent_group"; +} diff --git a/src/serialization/resources/knowledgebase/resources/groups/types/index.ts b/src/serialization/resources/knowledgebase/resources/groups/types/index.ts new file mode 100644 index 000000000..a3d3be2ea --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/groups/types/index.ts @@ -0,0 +1,2 @@ +export * from "./GroupsListRequestExpand"; +export * from "./GroupsRetrieveRequestExpand"; diff --git a/src/serialization/resources/knowledgebase/resources/index.ts b/src/serialization/resources/knowledgebase/resources/index.ts new file mode 100644 index 000000000..f44ea26d5 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/index.ts @@ -0,0 +1,26 @@ +export * as articles from "./articles"; +export * from "./articles/types"; +export * as asyncPassthrough from "./asyncPassthrough"; +export * from "./asyncPassthrough/types"; +export * as containers from "./containers"; +export * from "./containers/types"; +export * as groups from "./groups"; +export * from "./groups/types"; +export * as issues from "./issues"; +export * from "./issues/types"; +export * as linkToken from "./linkToken"; +export * from "./linkToken/types"; +export * as linkedAccounts from "./linkedAccounts"; +export * from "./linkedAccounts/types"; +export * as forceResync from "./forceResync"; +export * as webhookReceivers from "./webhookReceivers"; +export * as scopes from "./scopes"; +export * from "./scopes/client/requests"; +export * as fieldMapping from "./fieldMapping"; +export * from "./fieldMapping/client/requests"; +export * as generateKey from "./generateKey"; +export * from "./generateKey/client/requests"; +export * from "./linkToken/client/requests"; +export * as regenerateKey from "./regenerateKey"; +export * from "./regenerateKey/client/requests"; +export * from "./webhookReceivers/client/requests"; diff --git a/src/serialization/resources/knowledgebase/resources/issues/index.ts b/src/serialization/resources/knowledgebase/resources/issues/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/issues/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts b/src/serialization/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts new file mode 100644 index 000000000..82340ee03 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/issues/types/IssuesListRequestStatus.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const IssuesListRequestStatus: core.serialization.Schema< + serializers.knowledgebase.IssuesListRequestStatus.Raw, + Merge.knowledgebase.IssuesListRequestStatus +> = core.serialization.enum_(["ONGOING", "RESOLVED"]); + +export declare namespace IssuesListRequestStatus { + export type Raw = "ONGOING" | "RESOLVED"; +} diff --git a/src/serialization/resources/knowledgebase/resources/issues/types/index.ts b/src/serialization/resources/knowledgebase/resources/issues/types/index.ts new file mode 100644 index 000000000..554cdf48c --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/issues/types/index.ts @@ -0,0 +1 @@ +export * from "./IssuesListRequestStatus"; diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/client/index.ts b/src/serialization/resources/knowledgebase/resources/linkToken/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts b/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts new file mode 100644 index 000000000..1f3ea72b3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/EndUserDetailsRequest.ts @@ -0,0 +1,68 @@ +/** + * 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 { CategoriesEnum } from "../../../../types/CategoriesEnum"; +import { CommonModelScopesBodyRequest } from "../../../../types/CommonModelScopesBodyRequest"; +import { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; +import { EndUserDetailsRequestLanguage } from "../../types/EndUserDetailsRequestLanguage"; + +export const EndUserDetailsRequest: core.serialization.Schema< + serializers.knowledgebase.EndUserDetailsRequest.Raw, + Merge.knowledgebase.EndUserDetailsRequest +> = core.serialization.object({ + endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), + endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), + endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string()), + categories: core.serialization.list(CategoriesEnum), + integration: core.serialization.string().optional(), + linkExpiryMins: core.serialization.property("link_expiry_mins", core.serialization.number().optional()), + shouldCreateMagicLinkUrl: core.serialization.property( + "should_create_magic_link_url", + core.serialization.boolean().optional(), + ), + hideAdminMagicLink: core.serialization.property("hide_admin_magic_link", core.serialization.boolean().optional()), + commonModels: core.serialization.property( + "common_models", + core.serialization.list(CommonModelScopesBodyRequest).optional(), + ), + categoryCommonModelScopes: core.serialization.property( + "category_common_model_scopes", + core.serialization + .record( + core.serialization.string(), + core.serialization.list(IndividualCommonModelScopeDeserializerRequest).optional(), + ) + .optional(), + ), + language: EndUserDetailsRequestLanguage.optional(), + areSyncsDisabled: core.serialization.property("are_syncs_disabled", core.serialization.boolean().optional()), + integrationSpecificConfig: core.serialization.property( + "integration_specific_config", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), +}); + +export declare namespace EndUserDetailsRequest { + export interface Raw { + end_user_email_address: string; + end_user_organization_name: string; + end_user_origin_id: string; + categories: CategoriesEnum.Raw[]; + integration?: string | null; + link_expiry_mins?: number | null; + should_create_magic_link_url?: boolean | null; + hide_admin_magic_link?: boolean | null; + common_models?: CommonModelScopesBodyRequest.Raw[] | null; + category_common_model_scopes?: Record< + string, + IndividualCommonModelScopeDeserializerRequest.Raw[] | null | undefined + > | null; + language?: EndUserDetailsRequestLanguage.Raw | null; + are_syncs_disabled?: boolean | null; + integration_specific_config?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/index.ts new file mode 100644 index 000000000..d94b44a3e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/client/requests/index.ts @@ -0,0 +1 @@ +export { EndUserDetailsRequest } from "./EndUserDetailsRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/index.ts b/src/serialization/resources/knowledgebase/resources/linkToken/index.ts new file mode 100644 index 000000000..c9240f83b --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.ts b/src/serialization/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.ts new file mode 100644 index 000000000..2db79309a --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/types/EndUserDetailsRequestLanguage.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 { LanguageEnum } from "../../../types/LanguageEnum"; + +export const EndUserDetailsRequestLanguage: core.serialization.Schema< + serializers.knowledgebase.EndUserDetailsRequestLanguage.Raw, + Merge.knowledgebase.EndUserDetailsRequestLanguage +> = core.serialization.undiscriminatedUnion([LanguageEnum, core.serialization.string()]); + +export declare namespace EndUserDetailsRequestLanguage { + export type Raw = LanguageEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/resources/linkToken/types/index.ts b/src/serialization/resources/knowledgebase/resources/linkToken/types/index.ts new file mode 100644 index 000000000..c90e13c37 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkToken/types/index.ts @@ -0,0 +1 @@ +export * from "./EndUserDetailsRequestLanguage"; diff --git a/src/serialization/resources/knowledgebase/resources/linkedAccounts/index.ts b/src/serialization/resources/knowledgebase/resources/linkedAccounts/index.ts new file mode 100644 index 000000000..eea524d65 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkedAccounts/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts b/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts new file mode 100644 index 000000000..865e45de3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/LinkedAccountsListRequestCategory.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const LinkedAccountsListRequestCategory: core.serialization.Schema< + serializers.knowledgebase.LinkedAccountsListRequestCategory.Raw, + Merge.knowledgebase.LinkedAccountsListRequestCategory +> = core.serialization.enum_(["accounting", "ats", "crm", "filestorage", "hris", "knowledgebase", "mktg", "ticketing"]); + +export declare namespace LinkedAccountsListRequestCategory { + export type Raw = "accounting" | "ats" | "crm" | "filestorage" | "hris" | "knowledgebase" | "mktg" | "ticketing"; +} diff --git a/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/index.ts b/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/index.ts new file mode 100644 index 000000000..91de6010a --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/linkedAccounts/types/index.ts @@ -0,0 +1 @@ +export * from "./LinkedAccountsListRequestCategory"; diff --git a/src/serialization/resources/knowledgebase/resources/regenerateKey/client/index.ts b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts new file mode 100644 index 000000000..f5aad5f38 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/RemoteKeyForRegenerationRequest.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const RemoteKeyForRegenerationRequest: core.serialization.Schema< + serializers.knowledgebase.RemoteKeyForRegenerationRequest.Raw, + Merge.knowledgebase.RemoteKeyForRegenerationRequest +> = core.serialization.object({ + name: core.serialization.string(), +}); + +export declare namespace RemoteKeyForRegenerationRequest { + export interface Raw { + name: string; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts new file mode 100644 index 000000000..2987ef933 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/regenerateKey/client/requests/index.ts @@ -0,0 +1 @@ +export { RemoteKeyForRegenerationRequest } from "./RemoteKeyForRegenerationRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/regenerateKey/index.ts b/src/serialization/resources/knowledgebase/resources/regenerateKey/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/regenerateKey/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/scopes/client/index.ts b/src/serialization/resources/knowledgebase/resources/scopes/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/scopes/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts new file mode 100644 index 000000000..c0708de36 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/scopes/client/requests/LinkedAccountCommonModelScopeDeserializerRequest.ts @@ -0,0 +1,24 @@ +/** + * 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 { IndividualCommonModelScopeDeserializerRequest } from "../../../../types/IndividualCommonModelScopeDeserializerRequest"; + +export const LinkedAccountCommonModelScopeDeserializerRequest: core.serialization.Schema< + serializers.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest.Raw, + Merge.knowledgebase.LinkedAccountCommonModelScopeDeserializerRequest +> = core.serialization.object({ + commonModels: core.serialization.property( + "common_models", + core.serialization.list(IndividualCommonModelScopeDeserializerRequest), + ), +}); + +export declare namespace LinkedAccountCommonModelScopeDeserializerRequest { + export interface Raw { + common_models: IndividualCommonModelScopeDeserializerRequest.Raw[]; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/scopes/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/scopes/client/requests/index.ts new file mode 100644 index 000000000..28d8d7974 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/scopes/client/requests/index.ts @@ -0,0 +1 @@ +export { LinkedAccountCommonModelScopeDeserializerRequest } from "./LinkedAccountCommonModelScopeDeserializerRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/scopes/index.ts b/src/serialization/resources/knowledgebase/resources/scopes/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/scopes/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/index.ts b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/index.ts new file mode 100644 index 000000000..257d03e90 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/index.ts @@ -0,0 +1,2 @@ +export * as list from "./list"; +export * from "./requests"; diff --git a/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/list.ts b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/list.ts new file mode 100644 index 000000000..13ae6c214 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/list.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 { WebhookReceiver } from "../../../types/WebhookReceiver"; + +export const Response: core.serialization.Schema< + serializers.knowledgebase.webhookReceivers.list.Response.Raw, + Merge.knowledgebase.WebhookReceiver[] +> = core.serialization.list(WebhookReceiver); + +export declare namespace Response { + export type Raw = WebhookReceiver.Raw[]; +} diff --git a/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts new file mode 100644 index 000000000..24bcbdf33 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/WebhookReceiverRequest.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const WebhookReceiverRequest: core.serialization.Schema< + serializers.knowledgebase.WebhookReceiverRequest.Raw, + Merge.knowledgebase.WebhookReceiverRequest +> = core.serialization.object({ + event: core.serialization.string(), + isActive: core.serialization.property("is_active", core.serialization.boolean()), + key: core.serialization.string().optional(), +}); + +export declare namespace WebhookReceiverRequest { + export interface Raw { + event: string; + is_active: boolean; + key?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts new file mode 100644 index 000000000..29f534250 --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/webhookReceivers/client/requests/index.ts @@ -0,0 +1 @@ +export { WebhookReceiverRequest } from "./WebhookReceiverRequest"; diff --git a/src/serialization/resources/knowledgebase/resources/webhookReceivers/index.ts b/src/serialization/resources/knowledgebase/resources/webhookReceivers/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/knowledgebase/resources/webhookReceivers/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/resources/knowledgebase/types/AccountDetails.ts b/src/serialization/resources/knowledgebase/types/AccountDetails.ts new file mode 100644 index 000000000..8afd98af7 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetails.ts @@ -0,0 +1,46 @@ +/** + * 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 { AccountDetailsCategory } from "./AccountDetailsCategory"; + +export const AccountDetails: core.serialization.ObjectSchema< + serializers.knowledgebase.AccountDetails.Raw, + Merge.knowledgebase.AccountDetails +> = core.serialization.object({ + id: core.serialization.string().optional(), + integration: core.serialization.string().optional(), + integrationSlug: core.serialization.property("integration_slug", core.serialization.string().optional()), + category: AccountDetailsCategory.optional(), + endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), + endUserOrganizationName: core.serialization.property( + "end_user_organization_name", + core.serialization.string().optional(), + ), + endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string().optional()), + status: core.serialization.string().optional(), + webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string().optional()), + isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), + accountType: core.serialization.property("account_type", core.serialization.string().optional()), + completedAt: core.serialization.property("completed_at", core.serialization.date().optional()), +}); + +export declare namespace AccountDetails { + export interface Raw { + id?: string | null; + integration?: string | null; + integration_slug?: string | null; + category?: AccountDetailsCategory.Raw | null; + end_user_origin_id?: string | null; + end_user_organization_name?: string | null; + end_user_email_address?: string | null; + status?: string | null; + webhook_listener_url?: string | null; + is_duplicate?: boolean | null; + account_type?: string | null; + completed_at?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsAndActions.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActions.ts new file mode 100644 index 000000000..93c4b3610 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActions.ts @@ -0,0 +1,52 @@ +/** + * 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 { AccountDetailsAndActionsCategory } from "./AccountDetailsAndActionsCategory"; +import { AccountDetailsAndActionsStatus } from "./AccountDetailsAndActionsStatus"; +import { AccountDetailsAndActionsIntegration } from "./AccountDetailsAndActionsIntegration"; + +export const AccountDetailsAndActions: core.serialization.ObjectSchema< + serializers.knowledgebase.AccountDetailsAndActions.Raw, + Merge.knowledgebase.AccountDetailsAndActions +> = core.serialization.object({ + id: core.serialization.string(), + category: AccountDetailsAndActionsCategory.optional(), + status: AccountDetailsAndActionsStatus, + statusDetail: core.serialization.property("status_detail", core.serialization.string().optional()), + endUserOriginId: core.serialization.property("end_user_origin_id", core.serialization.string().optional()), + endUserOrganizationName: core.serialization.property("end_user_organization_name", core.serialization.string()), + endUserEmailAddress: core.serialization.property("end_user_email_address", core.serialization.string()), + subdomain: core.serialization.string().optional(), + webhookListenerUrl: core.serialization.property("webhook_listener_url", core.serialization.string()), + isDuplicate: core.serialization.property("is_duplicate", core.serialization.boolean().optional()), + integration: AccountDetailsAndActionsIntegration.optional(), + accountType: core.serialization.property("account_type", core.serialization.string()), + completedAt: core.serialization.property("completed_at", core.serialization.date()), + integrationSpecificFields: core.serialization.property( + "integration_specific_fields", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), +}); + +export declare namespace AccountDetailsAndActions { + export interface Raw { + id: string; + category?: AccountDetailsAndActionsCategory.Raw | null; + status: AccountDetailsAndActionsStatus.Raw; + status_detail?: string | null; + end_user_origin_id?: string | null; + end_user_organization_name: string; + end_user_email_address: string; + subdomain?: string | null; + webhook_listener_url: string; + is_duplicate?: boolean | null; + integration?: AccountDetailsAndActionsIntegration.Raw | null; + account_type: string; + completed_at: string; + integration_specific_fields?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsCategory.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsCategory.ts new file mode 100644 index 000000000..acfc4e359 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsCategory.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 { CategoryEnum } from "./CategoryEnum"; + +export const AccountDetailsAndActionsCategory: core.serialization.Schema< + serializers.knowledgebase.AccountDetailsAndActionsCategory.Raw, + Merge.knowledgebase.AccountDetailsAndActionsCategory +> = core.serialization.undiscriminatedUnion([CategoryEnum, core.serialization.string()]); + +export declare namespace AccountDetailsAndActionsCategory { + export type Raw = CategoryEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts new file mode 100644 index 000000000..68d64d15e --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsIntegration.ts @@ -0,0 +1,39 @@ +/** + * 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 { CategoriesEnum } from "./CategoriesEnum"; +import { ModelOperation } from "./ModelOperation"; + +export const AccountDetailsAndActionsIntegration: core.serialization.ObjectSchema< + serializers.knowledgebase.AccountDetailsAndActionsIntegration.Raw, + Merge.knowledgebase.AccountDetailsAndActionsIntegration +> = core.serialization.object({ + name: core.serialization.string(), + categories: core.serialization.list(CategoriesEnum), + image: core.serialization.string().optional(), + squareImage: core.serialization.property("square_image", core.serialization.string().optional()), + color: core.serialization.string(), + slug: core.serialization.string(), + passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), + availableModelOperations: core.serialization.property( + "available_model_operations", + core.serialization.list(ModelOperation).optional(), + ), +}); + +export declare namespace AccountDetailsAndActionsIntegration { + export interface Raw { + name: string; + categories: CategoriesEnum.Raw[]; + image?: string | null; + square_image?: string | null; + color: string; + slug: string; + passthrough_available: boolean; + available_model_operations?: ModelOperation.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatus.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatus.ts new file mode 100644 index 000000000..a7417bf7d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatus.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 { AccountDetailsAndActionsStatusEnum } from "./AccountDetailsAndActionsStatusEnum"; + +export const AccountDetailsAndActionsStatus: core.serialization.Schema< + serializers.knowledgebase.AccountDetailsAndActionsStatus.Raw, + Merge.knowledgebase.AccountDetailsAndActionsStatus +> = core.serialization.undiscriminatedUnion([AccountDetailsAndActionsStatusEnum, core.serialization.string()]); + +export declare namespace AccountDetailsAndActionsStatus { + export type Raw = AccountDetailsAndActionsStatusEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts new file mode 100644 index 000000000..253e3c22d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsAndActionsStatusEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const AccountDetailsAndActionsStatusEnum: core.serialization.Schema< + serializers.knowledgebase.AccountDetailsAndActionsStatusEnum.Raw, + Merge.knowledgebase.AccountDetailsAndActionsStatusEnum +> = core.serialization.enum_(["COMPLETE", "INCOMPLETE", "RELINK_NEEDED", "IDLE"]); + +export declare namespace AccountDetailsAndActionsStatusEnum { + export type Raw = "COMPLETE" | "INCOMPLETE" | "RELINK_NEEDED" | "IDLE"; +} diff --git a/src/serialization/resources/knowledgebase/types/AccountDetailsCategory.ts b/src/serialization/resources/knowledgebase/types/AccountDetailsCategory.ts new file mode 100644 index 000000000..2aa01e908 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountDetailsCategory.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 { CategoryEnum } from "./CategoryEnum"; + +export const AccountDetailsCategory: core.serialization.Schema< + serializers.knowledgebase.AccountDetailsCategory.Raw, + Merge.knowledgebase.AccountDetailsCategory +> = core.serialization.undiscriminatedUnion([CategoryEnum, core.serialization.string()]); + +export declare namespace AccountDetailsCategory { + export type Raw = CategoryEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AccountIntegration.ts b/src/serialization/resources/knowledgebase/types/AccountIntegration.ts new file mode 100644 index 000000000..3826ef9ec --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountIntegration.ts @@ -0,0 +1,48 @@ +/** + * 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 { CategoriesEnum } from "./CategoriesEnum"; + +export const AccountIntegration: core.serialization.ObjectSchema< + serializers.knowledgebase.AccountIntegration.Raw, + Merge.knowledgebase.AccountIntegration +> = core.serialization.object({ + name: core.serialization.string(), + abbreviatedName: core.serialization.property("abbreviated_name", core.serialization.string().optional()), + categories: core.serialization.list(CategoriesEnum).optional(), + image: core.serialization.string().optional(), + squareImage: core.serialization.property("square_image", core.serialization.string().optional()), + color: core.serialization.string().optional(), + slug: core.serialization.string().optional(), + apiEndpointsToDocumentationUrls: core.serialization.property( + "api_endpoints_to_documentation_urls", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + webhookSetupGuideUrl: core.serialization.property( + "webhook_setup_guide_url", + core.serialization.string().optional(), + ), + categoryBetaStatus: core.serialization.property( + "category_beta_status", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), +}); + +export declare namespace AccountIntegration { + export interface Raw { + name: string; + abbreviated_name?: string | null; + categories?: CategoriesEnum.Raw[] | null; + image?: string | null; + square_image?: string | null; + color?: string | null; + slug?: string | null; + api_endpoints_to_documentation_urls?: Record | null; + webhook_setup_guide_url?: string | null; + category_beta_status?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AccountToken.ts b/src/serialization/resources/knowledgebase/types/AccountToken.ts new file mode 100644 index 000000000..9532e5744 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AccountToken.ts @@ -0,0 +1,25 @@ +/** + * 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 { AccountIntegration } from "./AccountIntegration"; + +export const AccountToken: core.serialization.ObjectSchema< + serializers.knowledgebase.AccountToken.Raw, + Merge.knowledgebase.AccountToken +> = core.serialization.object({ + accountToken: core.serialization.property("account_token", core.serialization.string()), + integration: AccountIntegration, + id: core.serialization.string(), +}); + +export declare namespace AccountToken { + export interface Raw { + account_token: string; + integration: AccountIntegration.Raw; + id: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AdvancedMetadata.ts b/src/serialization/resources/knowledgebase/types/AdvancedMetadata.ts new file mode 100644 index 000000000..683d4fde4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AdvancedMetadata.ts @@ -0,0 +1,33 @@ +/** + * 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"; + +export const AdvancedMetadata: core.serialization.ObjectSchema< + serializers.knowledgebase.AdvancedMetadata.Raw, + Merge.knowledgebase.AdvancedMetadata +> = core.serialization.object({ + id: core.serialization.string(), + displayName: core.serialization.property("display_name", core.serialization.string().optional()), + description: core.serialization.string().optional(), + isRequired: core.serialization.property("is_required", core.serialization.boolean().optional()), + isCustom: core.serialization.property("is_custom", core.serialization.boolean().optional()), + fieldChoices: core.serialization.property( + "field_choices", + core.serialization.list(core.serialization.unknown()).optional(), + ), +}); + +export declare namespace AdvancedMetadata { + export interface Raw { + id: string; + display_name?: string | null; + description?: string | null; + is_required?: boolean | null; + is_custom?: boolean | null; + field_choices?: unknown[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/Article.ts b/src/serialization/resources/knowledgebase/types/Article.ts new file mode 100644 index 000000000..f92b221c9 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Article.ts @@ -0,0 +1,85 @@ +/** + * 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 { ArticleAuthor } from "./ArticleAuthor"; +import { ArticleLastEditedBy } from "./ArticleLastEditedBy"; +import { ArticleVisibility } from "./ArticleVisibility"; +import { ArticleStatus } from "./ArticleStatus"; +import { ArticleType } from "./ArticleType"; +import { ArticleParentContainer } from "./ArticleParentContainer"; +import { ArticleRootContainer } from "./ArticleRootContainer"; +import { ArticlePermissionsItem } from "./ArticlePermissionsItem"; +import { ArticleAttachmentsItem } from "./ArticleAttachmentsItem"; +import { RemoteData } from "./RemoteData"; + +export const Article: core.serialization.ObjectSchema< + serializers.knowledgebase.Article.Raw, + Merge.knowledgebase.Article +> = core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + title: core.serialization.string().optional(), + description: core.serialization.string().optional(), + author: ArticleAuthor.optional(), + lastEditedBy: core.serialization.property("last_edited_by", ArticleLastEditedBy.optional()), + visibility: ArticleVisibility.optional(), + articleContentDownloadUrl: core.serialization.property( + "article_content_download_url", + core.serialization.string().optional(), + ), + checksum: core.serialization.string().optional(), + articleUrl: core.serialization.property("article_url", core.serialization.string().optional()), + status: ArticleStatus.optional(), + type: ArticleType.optional(), + remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), + remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), + parentArticle: core.serialization.property( + "parent_article", + core.serialization.lazy(() => serializers.knowledgebase.ArticleParentArticle).optional(), + ), + parentContainer: core.serialization.property("parent_container", ArticleParentContainer.optional()), + rootContainer: core.serialization.property("root_container", ArticleRootContainer.optional()), + permissions: core.serialization.list(ArticlePermissionsItem).optional(), + attachments: core.serialization.list(ArticleAttachmentsItem.optional()).optional(), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), +}); + +export declare namespace Article { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + title?: string | null; + description?: string | null; + author?: ArticleAuthor.Raw | null; + last_edited_by?: ArticleLastEditedBy.Raw | null; + visibility?: ArticleVisibility.Raw | null; + article_content_download_url?: string | null; + checksum?: string | null; + article_url?: string | null; + status?: ArticleStatus.Raw | null; + type?: ArticleType.Raw | null; + remote_created_at?: string | null; + remote_updated_at?: string | null; + parent_article?: serializers.knowledgebase.ArticleParentArticle.Raw | null; + parent_container?: ArticleParentContainer.Raw | null; + root_container?: ArticleRootContainer.Raw | null; + permissions?: ArticlePermissionsItem.Raw[] | null; + attachments?: (ArticleAttachmentsItem.Raw | null | undefined)[] | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + remote_data?: RemoteData.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleAttachmentsItem.ts b/src/serialization/resources/knowledgebase/types/ArticleAttachmentsItem.ts new file mode 100644 index 000000000..ae1fdf85d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleAttachmentsItem.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 { Attachment } from "./Attachment"; + +export const ArticleAttachmentsItem: core.serialization.Schema< + serializers.knowledgebase.ArticleAttachmentsItem.Raw, + Merge.knowledgebase.ArticleAttachmentsItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Attachment]); + +export declare namespace ArticleAttachmentsItem { + export type Raw = string | Attachment.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleAuthor.ts b/src/serialization/resources/knowledgebase/types/ArticleAuthor.ts new file mode 100644 index 000000000..cf3d0ba61 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleAuthor.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 { User } from "./User"; + +export const ArticleAuthor: core.serialization.Schema< + serializers.knowledgebase.ArticleAuthor.Raw, + Merge.knowledgebase.ArticleAuthor +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); + +export declare namespace ArticleAuthor { + export type Raw = string | User.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleLastEditedBy.ts b/src/serialization/resources/knowledgebase/types/ArticleLastEditedBy.ts new file mode 100644 index 000000000..893f3b3ce --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleLastEditedBy.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 { User } from "./User"; + +export const ArticleLastEditedBy: core.serialization.Schema< + serializers.knowledgebase.ArticleLastEditedBy.Raw, + Merge.knowledgebase.ArticleLastEditedBy +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); + +export declare namespace ArticleLastEditedBy { + export type Raw = string | User.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleParentArticle.ts b/src/serialization/resources/knowledgebase/types/ArticleParentArticle.ts new file mode 100644 index 000000000..962838423 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleParentArticle.ts @@ -0,0 +1,19 @@ +/** + * 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"; + +export const ArticleParentArticle: core.serialization.Schema< + serializers.knowledgebase.ArticleParentArticle.Raw, + Merge.knowledgebase.ArticleParentArticle +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(() => serializers.knowledgebase.Article), +]); + +export declare namespace ArticleParentArticle { + export type Raw = string | serializers.knowledgebase.Article.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleParentContainer.ts b/src/serialization/resources/knowledgebase/types/ArticleParentContainer.ts new file mode 100644 index 000000000..3e11edfbe --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleParentContainer.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 { Container } from "./Container"; + +export const ArticleParentContainer: core.serialization.Schema< + serializers.knowledgebase.ArticleParentContainer.Raw, + Merge.knowledgebase.ArticleParentContainer +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Container]); + +export declare namespace ArticleParentContainer { + export type Raw = string | Container.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticlePermissionsItem.ts b/src/serialization/resources/knowledgebase/types/ArticlePermissionsItem.ts new file mode 100644 index 000000000..4184bdf66 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticlePermissionsItem.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 { Permission } from "./Permission"; + +export const ArticlePermissionsItem: core.serialization.Schema< + serializers.knowledgebase.ArticlePermissionsItem.Raw, + Merge.knowledgebase.ArticlePermissionsItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Permission]); + +export declare namespace ArticlePermissionsItem { + export type Raw = string | Permission.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleRootContainer.ts b/src/serialization/resources/knowledgebase/types/ArticleRootContainer.ts new file mode 100644 index 000000000..386fd83b0 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleRootContainer.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 { Container } from "./Container"; + +export const ArticleRootContainer: core.serialization.Schema< + serializers.knowledgebase.ArticleRootContainer.Raw, + Merge.knowledgebase.ArticleRootContainer +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Container]); + +export declare namespace ArticleRootContainer { + export type Raw = string | Container.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleStatus.ts b/src/serialization/resources/knowledgebase/types/ArticleStatus.ts new file mode 100644 index 000000000..5be69ea67 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleStatus.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 { Status3C6Enum } from "./Status3C6Enum"; + +export const ArticleStatus: core.serialization.Schema< + serializers.knowledgebase.ArticleStatus.Raw, + Merge.knowledgebase.ArticleStatus +> = core.serialization.undiscriminatedUnion([Status3C6Enum, core.serialization.string()]); + +export declare namespace ArticleStatus { + export type Raw = Status3C6Enum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleType.ts b/src/serialization/resources/knowledgebase/types/ArticleType.ts new file mode 100644 index 000000000..2dd44fb8a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleType.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 { ArticleTypeEnum } from "./ArticleTypeEnum"; + +export const ArticleType: core.serialization.Schema< + serializers.knowledgebase.ArticleType.Raw, + Merge.knowledgebase.ArticleType +> = core.serialization.undiscriminatedUnion([ArticleTypeEnum, core.serialization.string()]); + +export declare namespace ArticleType { + export type Raw = ArticleTypeEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleTypeEnum.ts b/src/serialization/resources/knowledgebase/types/ArticleTypeEnum.ts new file mode 100644 index 000000000..01cfd0ae1 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleTypeEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const ArticleTypeEnum: core.serialization.Schema< + serializers.knowledgebase.ArticleTypeEnum.Raw, + Merge.knowledgebase.ArticleTypeEnum +> = core.serialization.enum_(["PAGE", "BLOG_POST", "SMART_LINK"]); + +export declare namespace ArticleTypeEnum { + export type Raw = "PAGE" | "BLOG_POST" | "SMART_LINK"; +} diff --git a/src/serialization/resources/knowledgebase/types/ArticleVisibility.ts b/src/serialization/resources/knowledgebase/types/ArticleVisibility.ts new file mode 100644 index 000000000..ac5df8b33 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ArticleVisibility.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 { VisibilityEnum } from "./VisibilityEnum"; + +export const ArticleVisibility: core.serialization.Schema< + serializers.knowledgebase.ArticleVisibility.Raw, + Merge.knowledgebase.ArticleVisibility +> = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); + +export declare namespace ArticleVisibility { + export type Raw = VisibilityEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AsyncPassthroughReciept.ts b/src/serialization/resources/knowledgebase/types/AsyncPassthroughReciept.ts new file mode 100644 index 000000000..ef849bf37 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AsyncPassthroughReciept.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const AsyncPassthroughReciept: core.serialization.ObjectSchema< + serializers.knowledgebase.AsyncPassthroughReciept.Raw, + Merge.knowledgebase.AsyncPassthroughReciept +> = core.serialization.object({ + asyncPassthroughReceiptId: core.serialization.property("async_passthrough_receipt_id", core.serialization.string()), +}); + +export declare namespace AsyncPassthroughReciept { + export interface Raw { + async_passthrough_receipt_id: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/Attachment.ts b/src/serialization/resources/knowledgebase/types/Attachment.ts new file mode 100644 index 000000000..2fb855695 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Attachment.ts @@ -0,0 +1,42 @@ +/** + * 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 { RemoteData } from "./RemoteData"; + +export const Attachment: core.serialization.ObjectSchema< + serializers.knowledgebase.Attachment.Raw, + Merge.knowledgebase.Attachment +> = core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + name: core.serialization.string().optional(), + description: core.serialization.string().optional(), + attachmentUrl: core.serialization.property("attachment_url", core.serialization.string().optional()), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), +}); + +export declare namespace Attachment { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + name?: string | null; + description?: string | null; + attachment_url?: string | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + remote_data?: RemoteData.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AuditLogEvent.ts b/src/serialization/resources/knowledgebase/types/AuditLogEvent.ts new file mode 100644 index 000000000..6dd1513a6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AuditLogEvent.ts @@ -0,0 +1,36 @@ +/** + * 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 { AuditLogEventRole } from "./AuditLogEventRole"; +import { AuditLogEventEventType } from "./AuditLogEventEventType"; + +export const AuditLogEvent: core.serialization.ObjectSchema< + serializers.knowledgebase.AuditLogEvent.Raw, + Merge.knowledgebase.AuditLogEvent +> = core.serialization.object({ + id: core.serialization.string().optional(), + userName: core.serialization.property("user_name", core.serialization.string().optional()), + userEmail: core.serialization.property("user_email", core.serialization.string().optional()), + role: AuditLogEventRole, + ipAddress: core.serialization.property("ip_address", core.serialization.string()), + eventType: core.serialization.property("event_type", AuditLogEventEventType), + eventDescription: core.serialization.property("event_description", core.serialization.string()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), +}); + +export declare namespace AuditLogEvent { + export interface Raw { + id?: string | null; + user_name?: string | null; + user_email?: string | null; + role: AuditLogEventRole.Raw; + ip_address: string; + event_type: AuditLogEventEventType.Raw; + event_description: string; + created_at?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/AuditLogEventEventType.ts b/src/serialization/resources/knowledgebase/types/AuditLogEventEventType.ts new file mode 100644 index 000000000..6f4f8a175 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AuditLogEventEventType.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 { EventTypeEnum } from "./EventTypeEnum"; + +export const AuditLogEventEventType: core.serialization.Schema< + serializers.knowledgebase.AuditLogEventEventType.Raw, + Merge.knowledgebase.AuditLogEventEventType +> = core.serialization.undiscriminatedUnion([EventTypeEnum, core.serialization.string()]); + +export declare namespace AuditLogEventEventType { + export type Raw = EventTypeEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AuditLogEventRole.ts b/src/serialization/resources/knowledgebase/types/AuditLogEventRole.ts new file mode 100644 index 000000000..59f4b41f2 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AuditLogEventRole.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 { RoleEnum } from "./RoleEnum"; + +export const AuditLogEventRole: core.serialization.Schema< + serializers.knowledgebase.AuditLogEventRole.Raw, + Merge.knowledgebase.AuditLogEventRole +> = core.serialization.undiscriminatedUnion([RoleEnum, core.serialization.string()]); + +export declare namespace AuditLogEventRole { + export type Raw = RoleEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/AvailableActions.ts b/src/serialization/resources/knowledgebase/types/AvailableActions.ts new file mode 100644 index 000000000..c6a54f7a0 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/AvailableActions.ts @@ -0,0 +1,29 @@ +/** + * 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 { AccountIntegration } from "./AccountIntegration"; +import { ModelOperation } from "./ModelOperation"; + +export const AvailableActions: core.serialization.ObjectSchema< + serializers.knowledgebase.AvailableActions.Raw, + Merge.knowledgebase.AvailableActions +> = core.serialization.object({ + integration: AccountIntegration, + passthroughAvailable: core.serialization.property("passthrough_available", core.serialization.boolean()), + availableModelOperations: core.serialization.property( + "available_model_operations", + core.serialization.list(ModelOperation).optional(), + ), +}); + +export declare namespace AvailableActions { + export interface Raw { + integration: AccountIntegration.Raw; + passthrough_available: boolean; + available_model_operations?: ModelOperation.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/CategoriesEnum.ts b/src/serialization/resources/knowledgebase/types/CategoriesEnum.ts new file mode 100644 index 000000000..817337435 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/CategoriesEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const CategoriesEnum: core.serialization.Schema< + serializers.knowledgebase.CategoriesEnum.Raw, + Merge.knowledgebase.CategoriesEnum +> = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage", "knowledgebase"]); + +export declare namespace CategoriesEnum { + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage" | "knowledgebase"; +} diff --git a/src/serialization/resources/knowledgebase/types/CategoryEnum.ts b/src/serialization/resources/knowledgebase/types/CategoryEnum.ts new file mode 100644 index 000000000..b06e91292 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/CategoryEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const CategoryEnum: core.serialization.Schema< + serializers.knowledgebase.CategoryEnum.Raw, + Merge.knowledgebase.CategoryEnum +> = core.serialization.enum_(["hris", "ats", "accounting", "ticketing", "crm", "mktg", "filestorage", "knowledgebase"]); + +export declare namespace CategoryEnum { + export type Raw = "hris" | "ats" | "accounting" | "ticketing" | "crm" | "mktg" | "filestorage" | "knowledgebase"; +} diff --git a/src/serialization/resources/knowledgebase/types/CommonModelScopeApi.ts b/src/serialization/resources/knowledgebase/types/CommonModelScopeApi.ts new file mode 100644 index 000000000..ef1aadeaf --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/CommonModelScopeApi.ts @@ -0,0 +1,24 @@ +/** + * 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 { IndividualCommonModelScopeDeserializer } from "./IndividualCommonModelScopeDeserializer"; + +export const CommonModelScopeApi: core.serialization.ObjectSchema< + serializers.knowledgebase.CommonModelScopeApi.Raw, + Merge.knowledgebase.CommonModelScopeApi +> = core.serialization.object({ + commonModels: core.serialization.property( + "common_models", + core.serialization.list(IndividualCommonModelScopeDeserializer), + ), +}); + +export declare namespace CommonModelScopeApi { + export interface Raw { + common_models: IndividualCommonModelScopeDeserializer.Raw[]; + } +} diff --git a/src/serialization/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts b/src/serialization/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts new file mode 100644 index 000000000..a2dfd36a3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/CommonModelScopesBodyRequest.ts @@ -0,0 +1,28 @@ +/** + * 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 { EnabledActionsEnum } from "./EnabledActionsEnum"; + +export const CommonModelScopesBodyRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.CommonModelScopesBodyRequest.Raw, + Merge.knowledgebase.CommonModelScopesBodyRequest +> = core.serialization.object({ + modelId: core.serialization.property("model_id", core.serialization.string()), + enabledActions: core.serialization.property("enabled_actions", core.serialization.list(EnabledActionsEnum)), + disabledFields: core.serialization.property( + "disabled_fields", + core.serialization.list(core.serialization.string()), + ), +}); + +export declare namespace CommonModelScopesBodyRequest { + export interface Raw { + model_id: string; + enabled_actions: EnabledActionsEnum.Raw[]; + disabled_fields: string[]; + } +} diff --git a/src/serialization/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts b/src/serialization/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts new file mode 100644 index 000000000..7120f7790 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/CompletedAccountInitialScreenEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const CompletedAccountInitialScreenEnum: core.serialization.Schema< + serializers.knowledgebase.CompletedAccountInitialScreenEnum.Raw, + Merge.knowledgebase.CompletedAccountInitialScreenEnum +> = core.serialization.stringLiteral("SELECTIVE_SYNC"); + +export declare namespace CompletedAccountInitialScreenEnum { + export type Raw = "SELECTIVE_SYNC"; +} diff --git a/src/serialization/resources/knowledgebase/types/Container.ts b/src/serialization/resources/knowledgebase/types/Container.ts new file mode 100644 index 000000000..57b5bb857 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Container.ts @@ -0,0 +1,62 @@ +/** + * 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 { ContainerStatus } from "./ContainerStatus"; +import { ContainerType } from "./ContainerType"; +import { ContainerVisibility } from "./ContainerVisibility"; +import { ContainerPermissionsItem } from "./ContainerPermissionsItem"; +import { RemoteData } from "./RemoteData"; + +export const Container: core.serialization.ObjectSchema< + serializers.knowledgebase.Container.Raw, + Merge.knowledgebase.Container +> = core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + name: core.serialization.string().optional(), + description: core.serialization.string().optional(), + status: ContainerStatus.optional(), + containerUrl: core.serialization.property("container_url", core.serialization.string().optional()), + type: ContainerType.optional(), + visibility: ContainerVisibility.optional(), + remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), + remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), + parentArticle: core.serialization.property("parent_article", core.serialization.string().optional()), + parentContainer: core.serialization.property("parent_container", core.serialization.string().optional()), + permissions: core.serialization.list(ContainerPermissionsItem).optional(), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), +}); + +export declare namespace Container { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + name?: string | null; + description?: string | null; + status?: ContainerStatus.Raw | null; + container_url?: string | null; + type?: ContainerType.Raw | null; + visibility?: ContainerVisibility.Raw | null; + remote_created_at?: string | null; + remote_updated_at?: string | null; + parent_article?: string | null; + parent_container?: string | null; + permissions?: ContainerPermissionsItem.Raw[] | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + remote_data?: RemoteData.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ContainerPermissionsItem.ts b/src/serialization/resources/knowledgebase/types/ContainerPermissionsItem.ts new file mode 100644 index 000000000..65b6d6e33 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ContainerPermissionsItem.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 { Permission } from "./Permission"; + +export const ContainerPermissionsItem: core.serialization.Schema< + serializers.knowledgebase.ContainerPermissionsItem.Raw, + Merge.knowledgebase.ContainerPermissionsItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), Permission]); + +export declare namespace ContainerPermissionsItem { + export type Raw = string | Permission.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/ContainerStatus.ts b/src/serialization/resources/knowledgebase/types/ContainerStatus.ts new file mode 100644 index 000000000..2a9e340b9 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ContainerStatus.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 { Status3C6Enum } from "./Status3C6Enum"; + +export const ContainerStatus: core.serialization.Schema< + serializers.knowledgebase.ContainerStatus.Raw, + Merge.knowledgebase.ContainerStatus +> = core.serialization.undiscriminatedUnion([Status3C6Enum, core.serialization.string()]); + +export declare namespace ContainerStatus { + export type Raw = Status3C6Enum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/ContainerType.ts b/src/serialization/resources/knowledgebase/types/ContainerType.ts new file mode 100644 index 000000000..133fcef7d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ContainerType.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 { ContainerTypeEnum } from "./ContainerTypeEnum"; + +export const ContainerType: core.serialization.Schema< + serializers.knowledgebase.ContainerType.Raw, + Merge.knowledgebase.ContainerType +> = core.serialization.undiscriminatedUnion([ContainerTypeEnum, core.serialization.string()]); + +export declare namespace ContainerType { + export type Raw = ContainerTypeEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/ContainerTypeEnum.ts b/src/serialization/resources/knowledgebase/types/ContainerTypeEnum.ts new file mode 100644 index 000000000..ae89c3588 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ContainerTypeEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const ContainerTypeEnum: core.serialization.Schema< + serializers.knowledgebase.ContainerTypeEnum.Raw, + Merge.knowledgebase.ContainerTypeEnum +> = core.serialization.enum_(["FOLDER", "SPACE", "COLLECTION", "SECTION", "CATEGORY", "DATABASE"]); + +export declare namespace ContainerTypeEnum { + export type Raw = "FOLDER" | "SPACE" | "COLLECTION" | "SECTION" | "CATEGORY" | "DATABASE"; +} diff --git a/src/serialization/resources/knowledgebase/types/ContainerVisibility.ts b/src/serialization/resources/knowledgebase/types/ContainerVisibility.ts new file mode 100644 index 000000000..84a087b98 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ContainerVisibility.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 { VisibilityEnum } from "./VisibilityEnum"; + +export const ContainerVisibility: core.serialization.Schema< + serializers.knowledgebase.ContainerVisibility.Raw, + Merge.knowledgebase.ContainerVisibility +> = core.serialization.undiscriminatedUnion([VisibilityEnum, core.serialization.string()]); + +export declare namespace ContainerVisibility { + export type Raw = VisibilityEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/DataPassthroughRequest.ts b/src/serialization/resources/knowledgebase/types/DataPassthroughRequest.ts new file mode 100644 index 000000000..47d6f95f8 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/DataPassthroughRequest.ts @@ -0,0 +1,40 @@ +/** + * 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 { DataPassthroughRequestMethod } from "./DataPassthroughRequestMethod"; +import { MultipartFormFieldRequest } from "./MultipartFormFieldRequest"; +import { DataPassthroughRequestRequestFormat } from "./DataPassthroughRequestRequestFormat"; + +export const DataPassthroughRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.DataPassthroughRequest.Raw, + Merge.knowledgebase.DataPassthroughRequest +> = core.serialization.object({ + method: DataPassthroughRequestMethod, + path: core.serialization.string(), + baseUrlOverride: core.serialization.property("base_url_override", core.serialization.string().optional()), + data: core.serialization.string().optional(), + multipartFormData: core.serialization.property( + "multipart_form_data", + core.serialization.list(MultipartFormFieldRequest).optional(), + ), + headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + requestFormat: core.serialization.property("request_format", DataPassthroughRequestRequestFormat.optional()), + normalizeResponse: core.serialization.property("normalize_response", core.serialization.boolean().optional()), +}); + +export declare namespace DataPassthroughRequest { + export interface Raw { + method: DataPassthroughRequestMethod.Raw; + path: string; + base_url_override?: string | null; + data?: string | null; + multipart_form_data?: MultipartFormFieldRequest.Raw[] | null; + headers?: Record | null; + request_format?: DataPassthroughRequestRequestFormat.Raw | null; + normalize_response?: boolean | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/DataPassthroughRequestMethod.ts b/src/serialization/resources/knowledgebase/types/DataPassthroughRequestMethod.ts new file mode 100644 index 000000000..6ed13b702 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/DataPassthroughRequestMethod.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 { MethodEnum } from "./MethodEnum"; + +export const DataPassthroughRequestMethod: core.serialization.Schema< + serializers.knowledgebase.DataPassthroughRequestMethod.Raw, + Merge.knowledgebase.DataPassthroughRequestMethod +> = core.serialization.undiscriminatedUnion([MethodEnum, core.serialization.string()]); + +export declare namespace DataPassthroughRequestMethod { + export type Raw = MethodEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.ts b/src/serialization/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.ts new file mode 100644 index 000000000..5309c98b3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/DataPassthroughRequestRequestFormat.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 { RequestFormatEnum } from "./RequestFormatEnum"; + +export const DataPassthroughRequestRequestFormat: core.serialization.Schema< + serializers.knowledgebase.DataPassthroughRequestRequestFormat.Raw, + Merge.knowledgebase.DataPassthroughRequestRequestFormat +> = core.serialization.undiscriminatedUnion([RequestFormatEnum, core.serialization.string()]); + +export declare namespace DataPassthroughRequestRequestFormat { + export type Raw = RequestFormatEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/DebugModeLog.ts b/src/serialization/resources/knowledgebase/types/DebugModeLog.ts new file mode 100644 index 000000000..12c96139c --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/DebugModeLog.ts @@ -0,0 +1,25 @@ +/** + * 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 { DebugModelLogSummary } from "./DebugModelLogSummary"; + +export const DebugModeLog: core.serialization.ObjectSchema< + serializers.knowledgebase.DebugModeLog.Raw, + Merge.knowledgebase.DebugModeLog +> = core.serialization.object({ + logId: core.serialization.property("log_id", core.serialization.string()), + dashboardView: core.serialization.property("dashboard_view", core.serialization.string()), + logSummary: core.serialization.property("log_summary", DebugModelLogSummary), +}); + +export declare namespace DebugModeLog { + export interface Raw { + log_id: string; + dashboard_view: string; + log_summary: DebugModelLogSummary.Raw; + } +} diff --git a/src/serialization/resources/knowledgebase/types/DebugModelLogSummary.ts b/src/serialization/resources/knowledgebase/types/DebugModelLogSummary.ts new file mode 100644 index 000000000..f8713add5 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/DebugModelLogSummary.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const DebugModelLogSummary: core.serialization.ObjectSchema< + serializers.knowledgebase.DebugModelLogSummary.Raw, + Merge.knowledgebase.DebugModelLogSummary +> = core.serialization.object({ + url: core.serialization.string(), + method: core.serialization.string(), + statusCode: core.serialization.property("status_code", core.serialization.number()), +}); + +export declare namespace DebugModelLogSummary { + export interface Raw { + url: string; + method: string; + status_code: number; + } +} diff --git a/src/serialization/resources/knowledgebase/types/EnabledActionsEnum.ts b/src/serialization/resources/knowledgebase/types/EnabledActionsEnum.ts new file mode 100644 index 000000000..608a45ff4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/EnabledActionsEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const EnabledActionsEnum: core.serialization.Schema< + serializers.knowledgebase.EnabledActionsEnum.Raw, + Merge.knowledgebase.EnabledActionsEnum +> = core.serialization.enum_(["READ", "WRITE"]); + +export declare namespace EnabledActionsEnum { + export type Raw = "READ" | "WRITE"; +} diff --git a/src/serialization/resources/knowledgebase/types/EncodingEnum.ts b/src/serialization/resources/knowledgebase/types/EncodingEnum.ts new file mode 100644 index 000000000..00bde27c4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/EncodingEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const EncodingEnum: core.serialization.Schema< + serializers.knowledgebase.EncodingEnum.Raw, + Merge.knowledgebase.EncodingEnum +> = core.serialization.enum_(["RAW", "BASE64", "GZIP_BASE64"]); + +export declare namespace EncodingEnum { + export type Raw = "RAW" | "BASE64" | "GZIP_BASE64"; +} diff --git a/src/serialization/resources/knowledgebase/types/ErrorValidationProblem.ts b/src/serialization/resources/knowledgebase/types/ErrorValidationProblem.ts new file mode 100644 index 000000000..299df906c --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ErrorValidationProblem.ts @@ -0,0 +1,27 @@ +/** + * 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 { ValidationProblemSource } from "./ValidationProblemSource"; + +export const ErrorValidationProblem: core.serialization.ObjectSchema< + serializers.knowledgebase.ErrorValidationProblem.Raw, + Merge.knowledgebase.ErrorValidationProblem +> = core.serialization.object({ + source: ValidationProblemSource.optional(), + title: core.serialization.string(), + detail: core.serialization.string(), + problemType: core.serialization.property("problem_type", core.serialization.string()), +}); + +export declare namespace ErrorValidationProblem { + export interface Raw { + source?: ValidationProblemSource.Raw | null; + title: string; + detail: string; + problem_type: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/EventTypeEnum.ts b/src/serialization/resources/knowledgebase/types/EventTypeEnum.ts new file mode 100644 index 000000000..39df87895 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/EventTypeEnum.ts @@ -0,0 +1,103 @@ +/** + * 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"; + +export const EventTypeEnum: core.serialization.Schema< + serializers.knowledgebase.EventTypeEnum.Raw, + Merge.knowledgebase.EventTypeEnum +> = core.serialization.enum_([ + "CREATED_REMOTE_PRODUCTION_API_KEY", + "DELETED_REMOTE_PRODUCTION_API_KEY", + "CREATED_TEST_API_KEY", + "DELETED_TEST_API_KEY", + "REGENERATED_PRODUCTION_API_KEY", + "REGENERATED_WEBHOOK_SIGNATURE", + "INVITED_USER", + "TWO_FACTOR_AUTH_ENABLED", + "TWO_FACTOR_AUTH_DISABLED", + "DELETED_LINKED_ACCOUNT", + "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT", + "CREATED_DESTINATION", + "DELETED_DESTINATION", + "CHANGED_DESTINATION", + "CHANGED_SCOPES", + "CHANGED_PERSONAL_INFORMATION", + "CHANGED_ORGANIZATION_SETTINGS", + "ENABLED_INTEGRATION", + "DISABLED_INTEGRATION", + "ENABLED_CATEGORY", + "DISABLED_CATEGORY", + "CHANGED_PASSWORD", + "RESET_PASSWORD", + "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", + "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", + "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION", + "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT", + "CREATED_INTEGRATION_WIDE_FIELD_MAPPING", + "CREATED_LINKED_ACCOUNT_FIELD_MAPPING", + "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING", + "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING", + "DELETED_INTEGRATION_WIDE_FIELD_MAPPING", + "DELETED_LINKED_ACCOUNT_FIELD_MAPPING", + "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE", + "FORCED_LINKED_ACCOUNT_RESYNC", + "MUTED_ISSUE", + "GENERATED_MAGIC_LINK", + "ENABLED_MERGE_WEBHOOK", + "DISABLED_MERGE_WEBHOOK", + "MERGE_WEBHOOK_TARGET_CHANGED", + "END_USER_CREDENTIALS_ACCESSED", +]); + +export declare namespace EventTypeEnum { + export type Raw = + | "CREATED_REMOTE_PRODUCTION_API_KEY" + | "DELETED_REMOTE_PRODUCTION_API_KEY" + | "CREATED_TEST_API_KEY" + | "DELETED_TEST_API_KEY" + | "REGENERATED_PRODUCTION_API_KEY" + | "REGENERATED_WEBHOOK_SIGNATURE" + | "INVITED_USER" + | "TWO_FACTOR_AUTH_ENABLED" + | "TWO_FACTOR_AUTH_DISABLED" + | "DELETED_LINKED_ACCOUNT" + | "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + | "CREATED_DESTINATION" + | "DELETED_DESTINATION" + | "CHANGED_DESTINATION" + | "CHANGED_SCOPES" + | "CHANGED_PERSONAL_INFORMATION" + | "CHANGED_ORGANIZATION_SETTINGS" + | "ENABLED_INTEGRATION" + | "DISABLED_INTEGRATION" + | "ENABLED_CATEGORY" + | "DISABLED_CATEGORY" + | "CHANGED_PASSWORD" + | "RESET_PASSWORD" + | "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + | "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + | "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + | "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + | "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + | "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + | "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + | "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + | "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + | "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + | "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + | "FORCED_LINKED_ACCOUNT_RESYNC" + | "MUTED_ISSUE" + | "GENERATED_MAGIC_LINK" + | "ENABLED_MERGE_WEBHOOK" + | "DISABLED_MERGE_WEBHOOK" + | "MERGE_WEBHOOK_TARGET_CHANGED" + | "END_USER_CREDENTIALS_ACCESSED"; +} diff --git a/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApi.ts b/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApi.ts new file mode 100644 index 000000000..1a42ab6b3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApi.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const ExternalTargetFieldApi: core.serialization.ObjectSchema< + serializers.knowledgebase.ExternalTargetFieldApi.Raw, + Merge.knowledgebase.ExternalTargetFieldApi +> = core.serialization.object({ + name: core.serialization.string().optional(), + description: core.serialization.string().optional(), + isMapped: core.serialization.property("is_mapped", core.serialization.string().optional()), +}); + +export declare namespace ExternalTargetFieldApi { + export interface Raw { + name?: string | null; + description?: string | null; + is_mapped?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts b/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts new file mode 100644 index 000000000..cc21966b7 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ExternalTargetFieldApiResponse.ts @@ -0,0 +1,29 @@ +/** + * 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 { ExternalTargetFieldApi } from "./ExternalTargetFieldApi"; + +export const ExternalTargetFieldApiResponse: core.serialization.ObjectSchema< + serializers.knowledgebase.ExternalTargetFieldApiResponse.Raw, + Merge.knowledgebase.ExternalTargetFieldApiResponse +> = core.serialization.object({ + container: core.serialization.property("Container", core.serialization.list(ExternalTargetFieldApi).optional()), + article: core.serialization.property("Article", core.serialization.list(ExternalTargetFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(ExternalTargetFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(ExternalTargetFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(ExternalTargetFieldApi).optional()), +}); + +export declare namespace ExternalTargetFieldApiResponse { + export interface Raw { + Container?: ExternalTargetFieldApi.Raw[] | null; + Article?: ExternalTargetFieldApi.Raw[] | null; + Attachment?: ExternalTargetFieldApi.Raw[] | null; + User?: ExternalTargetFieldApi.Raw[] | null; + Group?: ExternalTargetFieldApi.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingApiInstance.ts b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstance.ts new file mode 100644 index 000000000..61dd7d6e6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstance.ts @@ -0,0 +1,30 @@ +/** + * 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 { FieldMappingApiInstanceTargetField } from "./FieldMappingApiInstanceTargetField"; +import { FieldMappingApiInstanceRemoteField } from "./FieldMappingApiInstanceRemoteField"; + +export const FieldMappingApiInstance: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingApiInstance.Raw, + Merge.knowledgebase.FieldMappingApiInstance +> = core.serialization.object({ + id: core.serialization.string().optional(), + isIntegrationWide: core.serialization.property("is_integration_wide", core.serialization.boolean().optional()), + targetField: core.serialization.property("target_field", FieldMappingApiInstanceTargetField.optional()), + remoteField: core.serialization.property("remote_field", FieldMappingApiInstanceRemoteField.optional()), + jmesPath: core.serialization.property("jmes_path", core.serialization.string().optional()), +}); + +export declare namespace FieldMappingApiInstance { + export interface Raw { + id?: string | null; + is_integration_wide?: boolean | null; + target_field?: FieldMappingApiInstanceTargetField.Raw | null; + remote_field?: FieldMappingApiInstanceRemoteField.Raw | null; + jmes_path?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts new file mode 100644 index 000000000..503155ab6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteField.ts @@ -0,0 +1,28 @@ +/** + * 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 { FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo } from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; + +export const FieldMappingApiInstanceRemoteField: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingApiInstanceRemoteField.Raw, + Merge.knowledgebase.FieldMappingApiInstanceRemoteField +> = core.serialization.object({ + remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string().optional()), + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + remoteEndpointInfo: core.serialization.property( + "remote_endpoint_info", + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo, + ), +}); + +export declare namespace FieldMappingApiInstanceRemoteField { + export interface Raw { + remote_key_name?: string | null; + schema?: Record | null; + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts new file mode 100644 index 000000000..15263a431 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.ts @@ -0,0 +1,27 @@ +/** + * 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"; + +export const FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Raw, + Merge.knowledgebase.FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo +> = core.serialization.object({ + method: core.serialization.string().optional(), + urlPath: core.serialization.property("url_path", core.serialization.string().optional()), + fieldTraversalPath: core.serialization.property( + "field_traversal_path", + core.serialization.list(core.serialization.string()).optional(), + ), +}); + +export declare namespace FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + export interface Raw { + method?: string | null; + url_path?: string | null; + field_traversal_path?: string[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts new file mode 100644 index 000000000..a41f79ffa --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceResponse.ts @@ -0,0 +1,29 @@ +/** + * 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 { FieldMappingApiInstance } from "./FieldMappingApiInstance"; + +export const FieldMappingApiInstanceResponse: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingApiInstanceResponse.Raw, + Merge.knowledgebase.FieldMappingApiInstanceResponse +> = core.serialization.object({ + container: core.serialization.property("Container", core.serialization.list(FieldMappingApiInstance).optional()), + article: core.serialization.property("Article", core.serialization.list(FieldMappingApiInstance).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(FieldMappingApiInstance).optional()), + user: core.serialization.property("User", core.serialization.list(FieldMappingApiInstance).optional()), + group: core.serialization.property("Group", core.serialization.list(FieldMappingApiInstance).optional()), +}); + +export declare namespace FieldMappingApiInstanceResponse { + export interface Raw { + Container?: FieldMappingApiInstance.Raw[] | null; + Article?: FieldMappingApiInstance.Raw[] | null; + Attachment?: FieldMappingApiInstance.Raw[] | null; + User?: FieldMappingApiInstance.Raw[] | null; + Group?: FieldMappingApiInstance.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts new file mode 100644 index 000000000..4ae98f0ca --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingApiInstanceTargetField.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const FieldMappingApiInstanceTargetField: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingApiInstanceTargetField.Raw, + Merge.knowledgebase.FieldMappingApiInstanceTargetField +> = core.serialization.object({ + name: core.serialization.string(), + description: core.serialization.string(), + isOrganizationWide: core.serialization.property("is_organization_wide", core.serialization.boolean()), +}); + +export declare namespace FieldMappingApiInstanceTargetField { + export interface Raw { + name: string; + description: string; + is_organization_wide: boolean; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldMappingInstanceResponse.ts b/src/serialization/resources/knowledgebase/types/FieldMappingInstanceResponse.ts new file mode 100644 index 000000000..d7c2fd542 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldMappingInstanceResponse.ts @@ -0,0 +1,30 @@ +/** + * 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 { FieldMappingApiInstance } from "./FieldMappingApiInstance"; +import { WarningValidationProblem } from "./WarningValidationProblem"; +import { ErrorValidationProblem } from "./ErrorValidationProblem"; +import { DebugModeLog } from "./DebugModeLog"; + +export const FieldMappingInstanceResponse: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldMappingInstanceResponse.Raw, + Merge.knowledgebase.FieldMappingInstanceResponse +> = core.serialization.object({ + model: FieldMappingApiInstance, + warnings: core.serialization.list(WarningValidationProblem), + errors: core.serialization.list(ErrorValidationProblem), + logs: core.serialization.list(DebugModeLog).optional(), +}); + +export declare namespace FieldMappingInstanceResponse { + export interface Raw { + model: FieldMappingApiInstance.Raw; + warnings: WarningValidationProblem.Raw[]; + errors: ErrorValidationProblem.Raw[]; + logs?: DebugModeLog.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializer.ts b/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializer.ts new file mode 100644 index 000000000..011795b7c --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializer.ts @@ -0,0 +1,28 @@ +/** + * 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"; + +export const FieldPermissionDeserializer: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldPermissionDeserializer.Raw, + Merge.knowledgebase.FieldPermissionDeserializer +> = core.serialization.object({ + enabledFields: core.serialization.property( + "enabled_fields", + core.serialization.list(core.serialization.unknown()).optional(), + ), + disabledFields: core.serialization.property( + "disabled_fields", + core.serialization.list(core.serialization.unknown()).optional(), + ), +}); + +export declare namespace FieldPermissionDeserializer { + export interface Raw { + enabled_fields?: unknown[] | null; + disabled_fields?: unknown[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts b/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts new file mode 100644 index 000000000..b837edeae --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/FieldPermissionDeserializerRequest.ts @@ -0,0 +1,28 @@ +/** + * 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"; + +export const FieldPermissionDeserializerRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.FieldPermissionDeserializerRequest.Raw, + Merge.knowledgebase.FieldPermissionDeserializerRequest +> = core.serialization.object({ + enabledFields: core.serialization.property( + "enabled_fields", + core.serialization.list(core.serialization.unknown()).optional(), + ), + disabledFields: core.serialization.property( + "disabled_fields", + core.serialization.list(core.serialization.unknown()).optional(), + ), +}); + +export declare namespace FieldPermissionDeserializerRequest { + export interface Raw { + enabled_fields?: unknown[] | null; + disabled_fields?: unknown[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/Group.ts b/src/serialization/resources/knowledgebase/types/Group.ts new file mode 100644 index 000000000..ee300c1b4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Group.ts @@ -0,0 +1,44 @@ +/** + * 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 { GroupUsersItem } from "./GroupUsersItem"; +import { RemoteData } from "./RemoteData"; + +export const Group: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + name: core.serialization.string().optional(), + parentGroup: core.serialization.property( + "parent_group", + core.serialization.lazy(() => serializers.knowledgebase.GroupParentGroup).optional(), + ), + users: core.serialization.list(GroupUsersItem).optional(), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + remoteData: core.serialization.property("remote_data", core.serialization.list(RemoteData).optional()), + }); + +export declare namespace Group { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + name?: string | null; + parent_group?: serializers.knowledgebase.GroupParentGroup.Raw | null; + users?: GroupUsersItem.Raw[] | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + remote_data?: RemoteData.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/GroupParentGroup.ts b/src/serialization/resources/knowledgebase/types/GroupParentGroup.ts new file mode 100644 index 000000000..de7f2a13a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/GroupParentGroup.ts @@ -0,0 +1,19 @@ +/** + * 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"; + +export const GroupParentGroup: core.serialization.Schema< + serializers.knowledgebase.GroupParentGroup.Raw, + Merge.knowledgebase.GroupParentGroup +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(() => serializers.knowledgebase.Group), +]); + +export declare namespace GroupParentGroup { + export type Raw = string | serializers.knowledgebase.Group.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/GroupUsersItem.ts b/src/serialization/resources/knowledgebase/types/GroupUsersItem.ts new file mode 100644 index 000000000..70bef0487 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/GroupUsersItem.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 { User } from "./User"; + +export const GroupUsersItem: core.serialization.Schema< + serializers.knowledgebase.GroupUsersItem.Raw, + Merge.knowledgebase.GroupUsersItem +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); + +export declare namespace GroupUsersItem { + export type Raw = string | User.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts b/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts new file mode 100644 index 000000000..7076ec3c3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializer.ts @@ -0,0 +1,29 @@ +/** + * 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 { ModelPermissionDeserializer } from "./ModelPermissionDeserializer"; +import { FieldPermissionDeserializer } from "./FieldPermissionDeserializer"; + +export const IndividualCommonModelScopeDeserializer: core.serialization.ObjectSchema< + serializers.knowledgebase.IndividualCommonModelScopeDeserializer.Raw, + Merge.knowledgebase.IndividualCommonModelScopeDeserializer +> = core.serialization.object({ + modelName: core.serialization.property("model_name", core.serialization.string()), + modelPermissions: core.serialization.property( + "model_permissions", + core.serialization.record(core.serialization.string(), ModelPermissionDeserializer).optional(), + ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializer.optional()), +}); + +export declare namespace IndividualCommonModelScopeDeserializer { + export interface Raw { + model_name: string; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializer.Raw | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts b/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts new file mode 100644 index 000000000..8121a00cf --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/IndividualCommonModelScopeDeserializerRequest.ts @@ -0,0 +1,29 @@ +/** + * 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 { ModelPermissionDeserializerRequest } from "./ModelPermissionDeserializerRequest"; +import { FieldPermissionDeserializerRequest } from "./FieldPermissionDeserializerRequest"; + +export const IndividualCommonModelScopeDeserializerRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.IndividualCommonModelScopeDeserializerRequest.Raw, + Merge.knowledgebase.IndividualCommonModelScopeDeserializerRequest +> = core.serialization.object({ + modelName: core.serialization.property("model_name", core.serialization.string()), + modelPermissions: core.serialization.property( + "model_permissions", + core.serialization.record(core.serialization.string(), ModelPermissionDeserializerRequest).optional(), + ), + fieldPermissions: core.serialization.property("field_permissions", FieldPermissionDeserializerRequest.optional()), +}); + +export declare namespace IndividualCommonModelScopeDeserializerRequest { + export interface Raw { + model_name: string; + model_permissions?: Record | null; + field_permissions?: FieldPermissionDeserializerRequest.Raw | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/Issue.ts b/src/serialization/resources/knowledgebase/types/Issue.ts new file mode 100644 index 000000000..d898fd9cf --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Issue.ts @@ -0,0 +1,39 @@ +/** + * 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 { IssueStatus } from "./IssueStatus"; + +export const Issue: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + status: IssueStatus.optional(), + errorDescription: core.serialization.property("error_description", core.serialization.string()), + endUser: core.serialization.property( + "end_user", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + firstIncidentTime: core.serialization.property("first_incident_time", core.serialization.date().optional()), + lastIncidentTime: core.serialization.property("last_incident_time", core.serialization.date().optional()), + isMuted: core.serialization.property("is_muted", core.serialization.boolean().optional()), + errorDetails: core.serialization.property( + "error_details", + core.serialization.list(core.serialization.string()).optional(), + ), + }); + +export declare namespace Issue { + export interface Raw { + id?: string | null; + status?: IssueStatus.Raw | null; + error_description: string; + end_user?: Record | null; + first_incident_time?: string | null; + last_incident_time?: string | null; + is_muted?: boolean | null; + error_details?: string[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/IssueStatus.ts b/src/serialization/resources/knowledgebase/types/IssueStatus.ts new file mode 100644 index 000000000..12706b4e9 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/IssueStatus.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 { IssueStatusEnum } from "./IssueStatusEnum"; + +export const IssueStatus: core.serialization.Schema< + serializers.knowledgebase.IssueStatus.Raw, + Merge.knowledgebase.IssueStatus +> = core.serialization.undiscriminatedUnion([IssueStatusEnum, core.serialization.string()]); + +export declare namespace IssueStatus { + export type Raw = IssueStatusEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/IssueStatusEnum.ts b/src/serialization/resources/knowledgebase/types/IssueStatusEnum.ts new file mode 100644 index 000000000..13793d6b7 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/IssueStatusEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const IssueStatusEnum: core.serialization.Schema< + serializers.knowledgebase.IssueStatusEnum.Raw, + Merge.knowledgebase.IssueStatusEnum +> = core.serialization.enum_(["ONGOING", "RESOLVED"]); + +export declare namespace IssueStatusEnum { + export type Raw = "ONGOING" | "RESOLVED"; +} diff --git a/src/serialization/resources/knowledgebase/types/LanguageEnum.ts b/src/serialization/resources/knowledgebase/types/LanguageEnum.ts new file mode 100644 index 000000000..be5ee81ec --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/LanguageEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const LanguageEnum: core.serialization.Schema< + serializers.knowledgebase.LanguageEnum.Raw, + Merge.knowledgebase.LanguageEnum +> = core.serialization.enum_(["en", "de"]); + +export declare namespace LanguageEnum { + export type Raw = "en" | "de"; +} diff --git a/src/serialization/resources/knowledgebase/types/LastSyncResultEnum.ts b/src/serialization/resources/knowledgebase/types/LastSyncResultEnum.ts new file mode 100644 index 000000000..5e3129359 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/LastSyncResultEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const LastSyncResultEnum: core.serialization.Schema< + serializers.knowledgebase.LastSyncResultEnum.Raw, + Merge.knowledgebase.LastSyncResultEnum +> = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); + +export declare namespace LastSyncResultEnum { + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; +} diff --git a/src/serialization/resources/knowledgebase/types/LinkToken.ts b/src/serialization/resources/knowledgebase/types/LinkToken.ts new file mode 100644 index 000000000..3ca40ac74 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/LinkToken.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const LinkToken: core.serialization.ObjectSchema< + serializers.knowledgebase.LinkToken.Raw, + Merge.knowledgebase.LinkToken +> = core.serialization.object({ + linkToken: core.serialization.property("link_token", core.serialization.string()), + integrationName: core.serialization.property("integration_name", core.serialization.string().optional()), + magicLinkUrl: core.serialization.property("magic_link_url", core.serialization.string().optional()), +}); + +export declare namespace LinkToken { + export interface Raw { + link_token: string; + integration_name?: string | null; + magic_link_url?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/MethodEnum.ts b/src/serialization/resources/knowledgebase/types/MethodEnum.ts new file mode 100644 index 000000000..69bfe381a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/MethodEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const MethodEnum: core.serialization.Schema< + serializers.knowledgebase.MethodEnum.Raw, + Merge.knowledgebase.MethodEnum +> = core.serialization.enum_(["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"]); + +export declare namespace MethodEnum { + export type Raw = "GET" | "OPTIONS" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE"; +} diff --git a/src/serialization/resources/knowledgebase/types/ModelOperation.ts b/src/serialization/resources/knowledgebase/types/ModelOperation.ts new file mode 100644 index 000000000..00c08e698 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ModelOperation.ts @@ -0,0 +1,35 @@ +/** + * 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"; + +export const ModelOperation: core.serialization.ObjectSchema< + serializers.knowledgebase.ModelOperation.Raw, + Merge.knowledgebase.ModelOperation +> = core.serialization.object({ + modelName: core.serialization.property("model_name", core.serialization.string()), + availableOperations: core.serialization.property( + "available_operations", + core.serialization.list(core.serialization.string()), + ), + requiredPostParameters: core.serialization.property( + "required_post_parameters", + core.serialization.list(core.serialization.string()), + ), + supportedFields: core.serialization.property( + "supported_fields", + core.serialization.list(core.serialization.string()), + ), +}); + +export declare namespace ModelOperation { + export interface Raw { + model_name: string; + available_operations: string[]; + required_post_parameters: string[]; + supported_fields: string[]; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializer.ts b/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializer.ts new file mode 100644 index 000000000..d8058559e --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializer.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const ModelPermissionDeserializer: core.serialization.ObjectSchema< + serializers.knowledgebase.ModelPermissionDeserializer.Raw, + Merge.knowledgebase.ModelPermissionDeserializer +> = core.serialization.object({ + isEnabled: core.serialization.property("is_enabled", core.serialization.boolean().optional()), +}); + +export declare namespace ModelPermissionDeserializer { + export interface Raw { + is_enabled?: boolean | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts b/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts new file mode 100644 index 000000000..227bd3263 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ModelPermissionDeserializerRequest.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const ModelPermissionDeserializerRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.ModelPermissionDeserializerRequest.Raw, + Merge.knowledgebase.ModelPermissionDeserializerRequest +> = core.serialization.object({ + isEnabled: core.serialization.property("is_enabled", core.serialization.boolean().optional()), +}); + +export declare namespace ModelPermissionDeserializerRequest { + export interface Raw { + is_enabled?: boolean | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequest.ts b/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequest.ts new file mode 100644 index 000000000..b209f258b --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequest.ts @@ -0,0 +1,29 @@ +/** + * 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 { MultipartFormFieldRequestEncoding } from "./MultipartFormFieldRequestEncoding"; + +export const MultipartFormFieldRequest: core.serialization.ObjectSchema< + serializers.knowledgebase.MultipartFormFieldRequest.Raw, + Merge.knowledgebase.MultipartFormFieldRequest +> = core.serialization.object({ + name: core.serialization.string(), + data: core.serialization.string(), + encoding: MultipartFormFieldRequestEncoding.optional(), + fileName: core.serialization.property("file_name", core.serialization.string().optional()), + contentType: core.serialization.property("content_type", core.serialization.string().optional()), +}); + +export declare namespace MultipartFormFieldRequest { + export interface Raw { + name: string; + data: string; + encoding?: MultipartFormFieldRequestEncoding.Raw | null; + file_name?: string | null; + content_type?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.ts b/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.ts new file mode 100644 index 000000000..afc52db4d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/MultipartFormFieldRequestEncoding.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 { EncodingEnum } from "./EncodingEnum"; + +export const MultipartFormFieldRequestEncoding: core.serialization.Schema< + serializers.knowledgebase.MultipartFormFieldRequestEncoding.Raw, + Merge.knowledgebase.MultipartFormFieldRequestEncoding +> = core.serialization.undiscriminatedUnion([EncodingEnum, core.serialization.string()]); + +export declare namespace MultipartFormFieldRequestEncoding { + export type Raw = EncodingEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts b/src/serialization/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts new file mode 100644 index 000000000..9c94f921d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedAccountDetailsAndActionsList.ts @@ -0,0 +1,25 @@ +/** + * 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 { AccountDetailsAndActions } from "./AccountDetailsAndActions"; + +export const PaginatedAccountDetailsAndActionsList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedAccountDetailsAndActionsList.Raw, + Merge.knowledgebase.PaginatedAccountDetailsAndActionsList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(AccountDetailsAndActions).optional(), +}); + +export declare namespace PaginatedAccountDetailsAndActionsList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: AccountDetailsAndActions.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedArticleList.ts b/src/serialization/resources/knowledgebase/types/PaginatedArticleList.ts new file mode 100644 index 000000000..34a73801a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedArticleList.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const PaginatedArticleList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedArticleList.Raw, + Merge.knowledgebase.PaginatedArticleList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.knowledgebase.Article)).optional(), +}); + +export declare namespace PaginatedArticleList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: serializers.knowledgebase.Article.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedAttachmentList.ts b/src/serialization/resources/knowledgebase/types/PaginatedAttachmentList.ts new file mode 100644 index 000000000..8ea97a5d6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedAttachmentList.ts @@ -0,0 +1,25 @@ +/** + * 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 { Attachment } from "./Attachment"; + +export const PaginatedAttachmentList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedAttachmentList.Raw, + Merge.knowledgebase.PaginatedAttachmentList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(Attachment).optional(), +}); + +export declare namespace PaginatedAttachmentList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: Attachment.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedAuditLogEventList.ts b/src/serialization/resources/knowledgebase/types/PaginatedAuditLogEventList.ts new file mode 100644 index 000000000..23b710333 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedAuditLogEventList.ts @@ -0,0 +1,25 @@ +/** + * 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 { AuditLogEvent } from "./AuditLogEvent"; + +export const PaginatedAuditLogEventList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedAuditLogEventList.Raw, + Merge.knowledgebase.PaginatedAuditLogEventList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(AuditLogEvent).optional(), +}); + +export declare namespace PaginatedAuditLogEventList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: AuditLogEvent.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedContainerList.ts b/src/serialization/resources/knowledgebase/types/PaginatedContainerList.ts new file mode 100644 index 000000000..8614e30c5 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedContainerList.ts @@ -0,0 +1,25 @@ +/** + * 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 { Container } from "./Container"; + +export const PaginatedContainerList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedContainerList.Raw, + Merge.knowledgebase.PaginatedContainerList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(Container).optional(), +}); + +export declare namespace PaginatedContainerList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: Container.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedGroupList.ts b/src/serialization/resources/knowledgebase/types/PaginatedGroupList.ts new file mode 100644 index 000000000..2aa811922 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedGroupList.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const PaginatedGroupList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedGroupList.Raw, + Merge.knowledgebase.PaginatedGroupList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(core.serialization.lazyObject(() => serializers.knowledgebase.Group)).optional(), +}); + +export declare namespace PaginatedGroupList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: serializers.knowledgebase.Group.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedIssueList.ts b/src/serialization/resources/knowledgebase/types/PaginatedIssueList.ts new file mode 100644 index 000000000..174764898 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedIssueList.ts @@ -0,0 +1,25 @@ +/** + * 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 { Issue } from "./Issue"; + +export const PaginatedIssueList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedIssueList.Raw, + Merge.knowledgebase.PaginatedIssueList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(Issue).optional(), +}); + +export declare namespace PaginatedIssueList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: Issue.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedSyncStatusList.ts b/src/serialization/resources/knowledgebase/types/PaginatedSyncStatusList.ts new file mode 100644 index 000000000..8c54a25f0 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedSyncStatusList.ts @@ -0,0 +1,25 @@ +/** + * 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 { SyncStatus } from "./SyncStatus"; + +export const PaginatedSyncStatusList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedSyncStatusList.Raw, + Merge.knowledgebase.PaginatedSyncStatusList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(SyncStatus).optional(), +}); + +export declare namespace PaginatedSyncStatusList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: SyncStatus.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PaginatedUserList.ts b/src/serialization/resources/knowledgebase/types/PaginatedUserList.ts new file mode 100644 index 000000000..dec9b5207 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PaginatedUserList.ts @@ -0,0 +1,25 @@ +/** + * 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 { User } from "./User"; + +export const PaginatedUserList: core.serialization.ObjectSchema< + serializers.knowledgebase.PaginatedUserList.Raw, + Merge.knowledgebase.PaginatedUserList +> = core.serialization.object({ + next: core.serialization.string().optional(), + previous: core.serialization.string().optional(), + results: core.serialization.list(User).optional(), +}); + +export declare namespace PaginatedUserList { + export interface Raw { + next?: string | null; + previous?: string | null; + results?: User.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/Permission.ts b/src/serialization/resources/knowledgebase/types/Permission.ts new file mode 100644 index 000000000..c907292e5 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Permission.ts @@ -0,0 +1,45 @@ +/** + * 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 { PermissionUser } from "./PermissionUser"; +import { PermissionGroup } from "./PermissionGroup"; +import { PermissionType } from "./PermissionType"; +import { RolesEnum } from "./RolesEnum"; + +export const Permission: core.serialization.ObjectSchema< + serializers.knowledgebase.Permission.Raw, + Merge.knowledgebase.Permission +> = core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + user: PermissionUser.optional(), + group: PermissionGroup.optional(), + type: PermissionType.optional(), + roles: core.serialization.list(RolesEnum.optional()).optional(), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), +}); + +export declare namespace Permission { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + user?: PermissionUser.Raw | null; + group?: PermissionGroup.Raw | null; + type?: PermissionType.Raw | null; + roles?: (RolesEnum.Raw | null | undefined)[] | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/PermissionGroup.ts b/src/serialization/resources/knowledgebase/types/PermissionGroup.ts new file mode 100644 index 000000000..5522d87c8 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PermissionGroup.ts @@ -0,0 +1,19 @@ +/** + * 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"; + +export const PermissionGroup: core.serialization.Schema< + serializers.knowledgebase.PermissionGroup.Raw, + Merge.knowledgebase.PermissionGroup +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.lazyObject(() => serializers.knowledgebase.Group), +]); + +export declare namespace PermissionGroup { + export type Raw = string | serializers.knowledgebase.Group.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/PermissionType.ts b/src/serialization/resources/knowledgebase/types/PermissionType.ts new file mode 100644 index 000000000..09013fdf0 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PermissionType.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 { PermissionTypeEnum } from "./PermissionTypeEnum"; + +export const PermissionType: core.serialization.Schema< + serializers.knowledgebase.PermissionType.Raw, + Merge.knowledgebase.PermissionType +> = core.serialization.undiscriminatedUnion([PermissionTypeEnum, core.serialization.string()]); + +export declare namespace PermissionType { + export type Raw = PermissionTypeEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/PermissionTypeEnum.ts b/src/serialization/resources/knowledgebase/types/PermissionTypeEnum.ts new file mode 100644 index 000000000..cd3ea2c2f --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PermissionTypeEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const PermissionTypeEnum: core.serialization.Schema< + serializers.knowledgebase.PermissionTypeEnum.Raw, + Merge.knowledgebase.PermissionTypeEnum +> = core.serialization.enum_(["USER", "GROUP", "COMPANY", "ANYONE"]); + +export declare namespace PermissionTypeEnum { + export type Raw = "USER" | "GROUP" | "COMPANY" | "ANYONE"; +} diff --git a/src/serialization/resources/knowledgebase/types/PermissionUser.ts b/src/serialization/resources/knowledgebase/types/PermissionUser.ts new file mode 100644 index 000000000..6761c9f2e --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/PermissionUser.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 { User } from "./User"; + +export const PermissionUser: core.serialization.Schema< + serializers.knowledgebase.PermissionUser.Raw, + Merge.knowledgebase.PermissionUser +> = core.serialization.undiscriminatedUnion([core.serialization.string(), User]); + +export declare namespace PermissionUser { + export type Raw = string | User.Raw; +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteData.ts b/src/serialization/resources/knowledgebase/types/RemoteData.ts new file mode 100644 index 000000000..7ab5f868d --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteData.ts @@ -0,0 +1,22 @@ +/** + * 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"; + +export const RemoteData: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteData.Raw, + Merge.knowledgebase.RemoteData +> = core.serialization.object({ + path: core.serialization.string(), + data: core.serialization.unknown().optional(), +}); + +export declare namespace RemoteData { + export interface Raw { + path: string; + data?: unknown | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteEndpointInfo.ts b/src/serialization/resources/knowledgebase/types/RemoteEndpointInfo.ts new file mode 100644 index 000000000..0dbaf27af --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteEndpointInfo.ts @@ -0,0 +1,27 @@ +/** + * 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"; + +export const RemoteEndpointInfo: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteEndpointInfo.Raw, + Merge.knowledgebase.RemoteEndpointInfo +> = core.serialization.object({ + method: core.serialization.string(), + urlPath: core.serialization.property("url_path", core.serialization.string()), + fieldTraversalPath: core.serialization.property( + "field_traversal_path", + core.serialization.list(core.serialization.unknown()), + ), +}); + +export declare namespace RemoteEndpointInfo { + export interface Raw { + method: string; + url_path: string; + field_traversal_path: unknown[]; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteFieldApi.ts b/src/serialization/resources/knowledgebase/types/RemoteFieldApi.ts new file mode 100644 index 000000000..5d996bf4f --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteFieldApi.ts @@ -0,0 +1,36 @@ +/** + * 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 { RemoteEndpointInfo } from "./RemoteEndpointInfo"; +import { RemoteFieldApiAdvancedMetadata } from "./RemoteFieldApiAdvancedMetadata"; +import { RemoteFieldApiCoverage } from "./RemoteFieldApiCoverage"; + +export const RemoteFieldApi: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteFieldApi.Raw, + Merge.knowledgebase.RemoteFieldApi +> = core.serialization.object({ + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()), + remoteKeyName: core.serialization.property("remote_key_name", core.serialization.string()), + remoteEndpointInfo: core.serialization.property("remote_endpoint_info", RemoteEndpointInfo), + exampleValues: core.serialization.property( + "example_values", + core.serialization.list(core.serialization.unknown()).optional(), + ), + advancedMetadata: core.serialization.property("advanced_metadata", RemoteFieldApiAdvancedMetadata.optional()), + coverage: RemoteFieldApiCoverage.optional(), +}); + +export declare namespace RemoteFieldApi { + export interface Raw { + schema: Record; + remote_key_name: string; + remote_endpoint_info: RemoteEndpointInfo.Raw; + example_values?: unknown[] | null; + advanced_metadata?: RemoteFieldApiAdvancedMetadata.Raw | null; + coverage?: RemoteFieldApiCoverage.Raw | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.ts b/src/serialization/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.ts new file mode 100644 index 000000000..e8049acb6 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteFieldApiAdvancedMetadata.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 { AdvancedMetadata } from "./AdvancedMetadata"; + +export const RemoteFieldApiAdvancedMetadata: core.serialization.Schema< + serializers.knowledgebase.RemoteFieldApiAdvancedMetadata.Raw, + Merge.knowledgebase.RemoteFieldApiAdvancedMetadata +> = core.serialization.undiscriminatedUnion([AdvancedMetadata, core.serialization.string()]); + +export declare namespace RemoteFieldApiAdvancedMetadata { + export type Raw = AdvancedMetadata.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteFieldApiCoverage.ts b/src/serialization/resources/knowledgebase/types/RemoteFieldApiCoverage.ts new file mode 100644 index 000000000..89db1fd30 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteFieldApiCoverage.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const RemoteFieldApiCoverage: core.serialization.Schema< + serializers.knowledgebase.RemoteFieldApiCoverage.Raw, + Merge.knowledgebase.RemoteFieldApiCoverage +> = core.serialization.undiscriminatedUnion([core.serialization.number(), core.serialization.number()]); + +export declare namespace RemoteFieldApiCoverage { + export type Raw = number | number; +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteFieldApiResponse.ts b/src/serialization/resources/knowledgebase/types/RemoteFieldApiResponse.ts new file mode 100644 index 000000000..fdb4141dc --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteFieldApiResponse.ts @@ -0,0 +1,29 @@ +/** + * 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 { RemoteFieldApi } from "./RemoteFieldApi"; + +export const RemoteFieldApiResponse: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteFieldApiResponse.Raw, + Merge.knowledgebase.RemoteFieldApiResponse +> = core.serialization.object({ + container: core.serialization.property("Container", core.serialization.list(RemoteFieldApi).optional()), + article: core.serialization.property("Article", core.serialization.list(RemoteFieldApi).optional()), + attachment: core.serialization.property("Attachment", core.serialization.list(RemoteFieldApi).optional()), + user: core.serialization.property("User", core.serialization.list(RemoteFieldApi).optional()), + group: core.serialization.property("Group", core.serialization.list(RemoteFieldApi).optional()), +}); + +export declare namespace RemoteFieldApiResponse { + export interface Raw { + Container?: RemoteFieldApi.Raw[] | null; + Article?: RemoteFieldApi.Raw[] | null; + Attachment?: RemoteFieldApi.Raw[] | null; + User?: RemoteFieldApi.Raw[] | null; + Group?: RemoteFieldApi.Raw[] | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteKey.ts b/src/serialization/resources/knowledgebase/types/RemoteKey.ts new file mode 100644 index 000000000..4e21fb051 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteKey.ts @@ -0,0 +1,22 @@ +/** + * 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"; + +export const RemoteKey: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteKey.Raw, + Merge.knowledgebase.RemoteKey +> = core.serialization.object({ + name: core.serialization.string(), + key: core.serialization.string(), +}); + +export declare namespace RemoteKey { + export interface Raw { + name: string; + key: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteResponse.ts b/src/serialization/resources/knowledgebase/types/RemoteResponse.ts new file mode 100644 index 000000000..eee29414c --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteResponse.ts @@ -0,0 +1,36 @@ +/** + * 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 { RemoteResponseResponseType } from "./RemoteResponseResponseType"; + +export const RemoteResponse: core.serialization.ObjectSchema< + serializers.knowledgebase.RemoteResponse.Raw, + Merge.knowledgebase.RemoteResponse +> = core.serialization.object({ + method: core.serialization.string(), + path: core.serialization.string(), + status: core.serialization.number(), + response: core.serialization.unknown(), + responseHeaders: core.serialization.property( + "response_headers", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + responseType: core.serialization.property("response_type", RemoteResponseResponseType.optional()), + headers: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), +}); + +export declare namespace RemoteResponse { + export interface Raw { + method: string; + path: string; + status: number; + response?: unknown; + response_headers?: Record | null; + response_type?: RemoteResponseResponseType.Raw | null; + headers?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/RemoteResponseResponseType.ts b/src/serialization/resources/knowledgebase/types/RemoteResponseResponseType.ts new file mode 100644 index 000000000..fe38859be --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RemoteResponseResponseType.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 { ResponseTypeEnum } from "./ResponseTypeEnum"; + +export const RemoteResponseResponseType: core.serialization.Schema< + serializers.knowledgebase.RemoteResponseResponseType.Raw, + Merge.knowledgebase.RemoteResponseResponseType +> = core.serialization.undiscriminatedUnion([ResponseTypeEnum, core.serialization.string()]); + +export declare namespace RemoteResponseResponseType { + export type Raw = ResponseTypeEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/RequestFormatEnum.ts b/src/serialization/resources/knowledgebase/types/RequestFormatEnum.ts new file mode 100644 index 000000000..6f3d4630f --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RequestFormatEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const RequestFormatEnum: core.serialization.Schema< + serializers.knowledgebase.RequestFormatEnum.Raw, + Merge.knowledgebase.RequestFormatEnum +> = core.serialization.enum_(["JSON", "XML", "MULTIPART"]); + +export declare namespace RequestFormatEnum { + export type Raw = "JSON" | "XML" | "MULTIPART"; +} diff --git a/src/serialization/resources/knowledgebase/types/ResponseTypeEnum.ts b/src/serialization/resources/knowledgebase/types/ResponseTypeEnum.ts new file mode 100644 index 000000000..c54d74613 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ResponseTypeEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const ResponseTypeEnum: core.serialization.Schema< + serializers.knowledgebase.ResponseTypeEnum.Raw, + Merge.knowledgebase.ResponseTypeEnum +> = core.serialization.enum_(["JSON", "BASE64_GZIP"]); + +export declare namespace ResponseTypeEnum { + export type Raw = "JSON" | "BASE64_GZIP"; +} diff --git a/src/serialization/resources/knowledgebase/types/RoleEnum.ts b/src/serialization/resources/knowledgebase/types/RoleEnum.ts new file mode 100644 index 000000000..57068eba7 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RoleEnum.ts @@ -0,0 +1,14 @@ +/** + * 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"; + +export const RoleEnum: core.serialization.Schema = + core.serialization.enum_(["ADMIN", "DEVELOPER", "MEMBER", "API", "SYSTEM", "MERGE_TEAM"]); + +export declare namespace RoleEnum { + export type Raw = "ADMIN" | "DEVELOPER" | "MEMBER" | "API" | "SYSTEM" | "MERGE_TEAM"; +} diff --git a/src/serialization/resources/knowledgebase/types/RolesEnum.ts b/src/serialization/resources/knowledgebase/types/RolesEnum.ts new file mode 100644 index 000000000..188e65261 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/RolesEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const RolesEnum: core.serialization.Schema< + serializers.knowledgebase.RolesEnum.Raw, + Merge.knowledgebase.RolesEnum +> = core.serialization.enum_(["READ", "WRITE", "OWNER"]); + +export declare namespace RolesEnum { + export type Raw = "READ" | "WRITE" | "OWNER"; +} diff --git a/src/serialization/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts b/src/serialization/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts new file mode 100644 index 000000000..0226a1e6f --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/SelectiveSyncConfigurationsUsageEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const SelectiveSyncConfigurationsUsageEnum: core.serialization.Schema< + serializers.knowledgebase.SelectiveSyncConfigurationsUsageEnum.Raw, + Merge.knowledgebase.SelectiveSyncConfigurationsUsageEnum +> = core.serialization.enum_(["IN_NEXT_SYNC", "IN_LAST_SYNC"]); + +export declare namespace SelectiveSyncConfigurationsUsageEnum { + export type Raw = "IN_NEXT_SYNC" | "IN_LAST_SYNC"; +} diff --git a/src/serialization/resources/knowledgebase/types/Status3C6Enum.ts b/src/serialization/resources/knowledgebase/types/Status3C6Enum.ts new file mode 100644 index 000000000..df90bff3c --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/Status3C6Enum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const Status3C6Enum: core.serialization.Schema< + serializers.knowledgebase.Status3C6Enum.Raw, + Merge.knowledgebase.Status3C6Enum +> = core.serialization.enum_(["DRAFT", "PUBLISHED", "ARCHIVED", "TRASH"]); + +export declare namespace Status3C6Enum { + export type Raw = "DRAFT" | "PUBLISHED" | "ARCHIVED" | "TRASH"; +} diff --git a/src/serialization/resources/knowledgebase/types/StatusFd5Enum.ts b/src/serialization/resources/knowledgebase/types/StatusFd5Enum.ts new file mode 100644 index 000000000..2d39007c5 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/StatusFd5Enum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const StatusFd5Enum: core.serialization.Schema< + serializers.knowledgebase.StatusFd5Enum.Raw, + Merge.knowledgebase.StatusFd5Enum +> = core.serialization.enum_(["SYNCING", "DONE", "FAILED", "DISABLED", "PAUSED", "PARTIALLY_SYNCED"]); + +export declare namespace StatusFd5Enum { + export type Raw = "SYNCING" | "DONE" | "FAILED" | "DISABLED" | "PAUSED" | "PARTIALLY_SYNCED"; +} diff --git a/src/serialization/resources/knowledgebase/types/SyncStatus.ts b/src/serialization/resources/knowledgebase/types/SyncStatus.ts new file mode 100644 index 000000000..15d8171f9 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/SyncStatus.ts @@ -0,0 +1,42 @@ +/** + * 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 { SyncStatusLastSyncResult } from "./SyncStatusLastSyncResult"; +import { SyncStatusStatus } from "./SyncStatusStatus"; +import { SelectiveSyncConfigurationsUsageEnum } from "./SelectiveSyncConfigurationsUsageEnum"; + +export const SyncStatus: core.serialization.ObjectSchema< + serializers.knowledgebase.SyncStatus.Raw, + Merge.knowledgebase.SyncStatus +> = core.serialization.object({ + modelName: core.serialization.property("model_name", core.serialization.string()), + modelId: core.serialization.property("model_id", core.serialization.string()), + lastSyncStart: core.serialization.property("last_sync_start", core.serialization.date().optional()), + nextSyncStart: core.serialization.property("next_sync_start", core.serialization.date().optional()), + lastSyncResult: core.serialization.property("last_sync_result", SyncStatusLastSyncResult.optional()), + lastSyncFinished: core.serialization.property("last_sync_finished", core.serialization.date().optional()), + status: SyncStatusStatus, + isInitialSync: core.serialization.property("is_initial_sync", core.serialization.boolean()), + selectiveSyncConfigurationsUsage: core.serialization.property( + "selective_sync_configurations_usage", + SelectiveSyncConfigurationsUsageEnum.optional(), + ), +}); + +export declare namespace SyncStatus { + export interface Raw { + model_name: string; + model_id: string; + last_sync_start?: string | null; + next_sync_start?: string | null; + last_sync_result?: SyncStatusLastSyncResult.Raw | null; + last_sync_finished?: string | null; + status: SyncStatusStatus.Raw; + is_initial_sync: boolean; + selective_sync_configurations_usage?: SelectiveSyncConfigurationsUsageEnum.Raw | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/SyncStatusLastSyncResult.ts b/src/serialization/resources/knowledgebase/types/SyncStatusLastSyncResult.ts new file mode 100644 index 000000000..24f5d583f --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/SyncStatusLastSyncResult.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 { LastSyncResultEnum } from "./LastSyncResultEnum"; + +export const SyncStatusLastSyncResult: core.serialization.Schema< + serializers.knowledgebase.SyncStatusLastSyncResult.Raw, + Merge.knowledgebase.SyncStatusLastSyncResult +> = core.serialization.undiscriminatedUnion([LastSyncResultEnum, core.serialization.string()]); + +export declare namespace SyncStatusLastSyncResult { + export type Raw = LastSyncResultEnum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/SyncStatusStatus.ts b/src/serialization/resources/knowledgebase/types/SyncStatusStatus.ts new file mode 100644 index 000000000..6514c747a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/SyncStatusStatus.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 { StatusFd5Enum } from "./StatusFd5Enum"; + +export const SyncStatusStatus: core.serialization.Schema< + serializers.knowledgebase.SyncStatusStatus.Raw, + Merge.knowledgebase.SyncStatusStatus +> = core.serialization.undiscriminatedUnion([StatusFd5Enum, core.serialization.string()]); + +export declare namespace SyncStatusStatus { + export type Raw = StatusFd5Enum.Raw | string; +} diff --git a/src/serialization/resources/knowledgebase/types/User.ts b/src/serialization/resources/knowledgebase/types/User.ts new file mode 100644 index 000000000..ebb26b239 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/User.ts @@ -0,0 +1,35 @@ +/** + * 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"; + +export const User: core.serialization.ObjectSchema = + core.serialization.object({ + id: core.serialization.string().optional(), + remoteId: core.serialization.property("remote_id", core.serialization.string().optional()), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + modifiedAt: core.serialization.property("modified_at", core.serialization.date().optional()), + name: core.serialization.string().optional(), + emailAddress: core.serialization.property("email_address", core.serialization.string().optional()), + remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), + fieldMappings: core.serialization.property( + "field_mappings", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + }); + +export declare namespace User { + export interface Raw { + id?: string | null; + remote_id?: string | null; + created_at?: string | null; + modified_at?: string | null; + name?: string | null; + email_address?: string | null; + remote_was_deleted?: boolean | null; + field_mappings?: Record | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/ValidationProblemSource.ts b/src/serialization/resources/knowledgebase/types/ValidationProblemSource.ts new file mode 100644 index 000000000..3fa4f6f35 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/ValidationProblemSource.ts @@ -0,0 +1,20 @@ +/** + * 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"; + +export const ValidationProblemSource: core.serialization.ObjectSchema< + serializers.knowledgebase.ValidationProblemSource.Raw, + Merge.knowledgebase.ValidationProblemSource +> = core.serialization.object({ + pointer: core.serialization.string(), +}); + +export declare namespace ValidationProblemSource { + export interface Raw { + pointer: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/VisibilityEnum.ts b/src/serialization/resources/knowledgebase/types/VisibilityEnum.ts new file mode 100644 index 000000000..b26dcc33a --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/VisibilityEnum.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +export const VisibilityEnum: core.serialization.Schema< + serializers.knowledgebase.VisibilityEnum.Raw, + Merge.knowledgebase.VisibilityEnum +> = core.serialization.enum_(["PUBLIC", "INTERNAL", "RESTRICTED"]); + +export declare namespace VisibilityEnum { + export type Raw = "PUBLIC" | "INTERNAL" | "RESTRICTED"; +} diff --git a/src/serialization/resources/knowledgebase/types/WarningValidationProblem.ts b/src/serialization/resources/knowledgebase/types/WarningValidationProblem.ts new file mode 100644 index 000000000..582a0acb3 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/WarningValidationProblem.ts @@ -0,0 +1,27 @@ +/** + * 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 { ValidationProblemSource } from "./ValidationProblemSource"; + +export const WarningValidationProblem: core.serialization.ObjectSchema< + serializers.knowledgebase.WarningValidationProblem.Raw, + Merge.knowledgebase.WarningValidationProblem +> = core.serialization.object({ + source: ValidationProblemSource.optional(), + title: core.serialization.string(), + detail: core.serialization.string(), + problemType: core.serialization.property("problem_type", core.serialization.string()), +}); + +export declare namespace WarningValidationProblem { + export interface Raw { + source?: ValidationProblemSource.Raw | null; + title: string; + detail: string; + problem_type: string; + } +} diff --git a/src/serialization/resources/knowledgebase/types/WebhookReceiver.ts b/src/serialization/resources/knowledgebase/types/WebhookReceiver.ts new file mode 100644 index 000000000..e7522fba4 --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/WebhookReceiver.ts @@ -0,0 +1,24 @@ +/** + * 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"; + +export const WebhookReceiver: core.serialization.ObjectSchema< + serializers.knowledgebase.WebhookReceiver.Raw, + Merge.knowledgebase.WebhookReceiver +> = core.serialization.object({ + event: core.serialization.string(), + isActive: core.serialization.property("is_active", core.serialization.boolean()), + key: core.serialization.string().optional(), +}); + +export declare namespace WebhookReceiver { + export interface Raw { + event: string; + is_active: boolean; + key?: string | null; + } +} diff --git a/src/serialization/resources/knowledgebase/types/index.ts b/src/serialization/resources/knowledgebase/types/index.ts new file mode 100644 index 000000000..adc5d3eca --- /dev/null +++ b/src/serialization/resources/knowledgebase/types/index.ts @@ -0,0 +1,113 @@ +export * from "./AccountDetailsCategory"; +export * from "./AccountDetails"; +export * from "./AccountDetailsAndActionsCategory"; +export * from "./AccountDetailsAndActionsStatus"; +export * from "./AccountDetailsAndActions"; +export * from "./AccountDetailsAndActionsIntegration"; +export * from "./AccountDetailsAndActionsStatusEnum"; +export * from "./AccountIntegration"; +export * from "./AccountToken"; +export * from "./AdvancedMetadata"; +export * from "./ArticleAuthor"; +export * from "./ArticleLastEditedBy"; +export * from "./ArticleVisibility"; +export * from "./ArticleStatus"; +export * from "./ArticleType"; +export * from "./ArticleParentArticle"; +export * from "./ArticleParentContainer"; +export * from "./ArticleRootContainer"; +export * from "./ArticlePermissionsItem"; +export * from "./ArticleAttachmentsItem"; +export * from "./Article"; +export * from "./ArticleTypeEnum"; +export * from "./AsyncPassthroughReciept"; +export * from "./Attachment"; +export * from "./AuditLogEventRole"; +export * from "./AuditLogEventEventType"; +export * from "./AuditLogEvent"; +export * from "./AvailableActions"; +export * from "./CategoriesEnum"; +export * from "./CategoryEnum"; +export * from "./CommonModelScopeApi"; +export * from "./CommonModelScopesBodyRequest"; +export * from "./CompletedAccountInitialScreenEnum"; +export * from "./ContainerStatus"; +export * from "./ContainerType"; +export * from "./ContainerVisibility"; +export * from "./ContainerPermissionsItem"; +export * from "./Container"; +export * from "./ContainerTypeEnum"; +export * from "./DataPassthroughRequestMethod"; +export * from "./DataPassthroughRequestRequestFormat"; +export * from "./DataPassthroughRequest"; +export * from "./DebugModeLog"; +export * from "./DebugModelLogSummary"; +export * from "./EnabledActionsEnum"; +export * from "./EncodingEnum"; +export * from "./ErrorValidationProblem"; +export * from "./EventTypeEnum"; +export * from "./ExternalTargetFieldApi"; +export * from "./ExternalTargetFieldApiResponse"; +export * from "./FieldMappingApiInstanceTargetField"; +export * from "./FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo"; +export * from "./FieldMappingApiInstanceRemoteField"; +export * from "./FieldMappingApiInstance"; +export * from "./FieldMappingApiInstanceResponse"; +export * from "./FieldMappingInstanceResponse"; +export * from "./FieldPermissionDeserializer"; +export * from "./FieldPermissionDeserializerRequest"; +export * from "./GroupParentGroup"; +export * from "./GroupUsersItem"; +export * from "./Group"; +export * from "./IndividualCommonModelScopeDeserializer"; +export * from "./IndividualCommonModelScopeDeserializerRequest"; +export * from "./IssueStatus"; +export * from "./Issue"; +export * from "./IssueStatusEnum"; +export * from "./LanguageEnum"; +export * from "./LastSyncResultEnum"; +export * from "./LinkToken"; +export * from "./MethodEnum"; +export * from "./ModelOperation"; +export * from "./ModelPermissionDeserializer"; +export * from "./ModelPermissionDeserializerRequest"; +export * from "./MultipartFormFieldRequestEncoding"; +export * from "./MultipartFormFieldRequest"; +export * from "./PaginatedAccountDetailsAndActionsList"; +export * from "./PaginatedArticleList"; +export * from "./PaginatedAttachmentList"; +export * from "./PaginatedAuditLogEventList"; +export * from "./PaginatedContainerList"; +export * from "./PaginatedGroupList"; +export * from "./PaginatedIssueList"; +export * from "./PaginatedSyncStatusList"; +export * from "./PaginatedUserList"; +export * from "./PermissionUser"; +export * from "./PermissionGroup"; +export * from "./PermissionType"; +export * from "./Permission"; +export * from "./PermissionTypeEnum"; +export * from "./RemoteData"; +export * from "./RemoteEndpointInfo"; +export * from "./RemoteFieldApiAdvancedMetadata"; +export * from "./RemoteFieldApiCoverage"; +export * from "./RemoteFieldApi"; +export * from "./RemoteFieldApiResponse"; +export * from "./RemoteKey"; +export * from "./RemoteResponseResponseType"; +export * from "./RemoteResponse"; +export * from "./RequestFormatEnum"; +export * from "./ResponseTypeEnum"; +export * from "./RoleEnum"; +export * from "./RolesEnum"; +export * from "./SelectiveSyncConfigurationsUsageEnum"; +export * from "./Status3C6Enum"; +export * from "./StatusFd5Enum"; +export * from "./SyncStatusLastSyncResult"; +export * from "./SyncStatusStatus"; +export * from "./SyncStatus"; +export * from "./User"; +export * from "./ValidationProblemSource"; +export * from "./VisibilityEnum"; +export * from "./WarningValidationProblem"; +export * from "./WebhookReceiver"; diff --git a/src/serialization/resources/ticketing/types/Collection.ts b/src/serialization/resources/ticketing/types/Collection.ts index 53f59e513..042ccf21e 100644 --- a/src/serialization/resources/ticketing/types/Collection.ts +++ b/src/serialization/resources/ticketing/types/Collection.ts @@ -25,6 +25,9 @@ export const Collection: core.serialization.ObjectSchema< "parent_collection", core.serialization.lazy(() => serializers.ticketing.CollectionParentCollection).optional(), ), + collectionUrl: core.serialization.property("collection_url", core.serialization.string().optional()), + remoteCreatedAt: core.serialization.property("remote_created_at", core.serialization.date().optional()), + remoteUpdatedAt: core.serialization.property("remote_updated_at", core.serialization.date().optional()), remoteWasDeleted: core.serialization.property("remote_was_deleted", core.serialization.boolean().optional()), fieldMappings: core.serialization.property( "field_mappings", @@ -44,6 +47,9 @@ export declare namespace Collection { access_level?: CollectionAccessLevel.Raw | null; collection_type?: CollectionCollectionType.Raw | null; parent_collection?: serializers.ticketing.CollectionParentCollection.Raw | null; + collection_url?: string | null; + remote_created_at?: string | null; + remote_updated_at?: string | null; remote_was_deleted?: boolean | null; field_mappings?: Record | null; remote_data?: RemoteData.Raw[] | null; diff --git a/src/version.ts b/src/version.ts index 13d998520..af160adcf 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "2.2.0"; +export const SDK_VERSION = "2.3.0"; diff --git a/tests/wire/knowledgebase/accountDetails.test.ts b/tests/wire/knowledgebase/accountDetails.test.ts new file mode 100644 index 000000000..57cee9cfb --- /dev/null +++ b/tests/wire/knowledgebase/accountDetails.test.ts @@ -0,0 +1,51 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("AccountDetails", () => { + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "0496d4c2-42e6-4072-80b3-7b69bfdc76fd", + integration: "BambooHR", + integration_slug: "bamboohr", + category: "hris", + end_user_origin_id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + end_user_organization_name: "Waystar Royco", + end_user_email_address: "kendall.roy@waystar-royco.com", + status: "COMPLETE", + webhook_listener_url: "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + is_duplicate: true, + account_type: "PRODUCTION", + completed_at: "2024-08-26T20:11:19Z", + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/account-details") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.accountDetails.retrieve(); + expect(response).toEqual({ + id: "0496d4c2-42e6-4072-80b3-7b69bfdc76fd", + integration: "BambooHR", + integrationSlug: "bamboohr", + category: "hris", + endUserOriginId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + endUserOrganizationName: "Waystar Royco", + endUserEmailAddress: "kendall.roy@waystar-royco.com", + status: "COMPLETE", + webhookListenerUrl: "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + isDuplicate: true, + accountType: "PRODUCTION", + completedAt: new Date("2024-08-26T20:11:19.000Z"), + }); + }); +}); diff --git a/tests/wire/knowledgebase/accountToken.test.ts b/tests/wire/knowledgebase/accountToken.test.ts new file mode 100644 index 000000000..e9d50bf97 --- /dev/null +++ b/tests/wire/knowledgebase/accountToken.test.ts @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("AccountToken", () => { + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + account_token: "T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB", + integration: { + name: "name", + abbreviated_name: "abbreviated_name", + categories: ["hris"], + image: "image", + square_image: "square_image", + color: "color", + slug: "slug", + api_endpoints_to_documentation_urls: { key: "value" }, + webhook_setup_guide_url: "webhook_setup_guide_url", + category_beta_status: { key: "value" }, + }, + id: "0496d4c2-42e6-4072-80b3-7b69bfdc76fd", + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/account-token/public_token") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.accountToken.retrieve("public_token"); + expect(response).toEqual({ + accountToken: "T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB", + integration: { + name: "name", + abbreviatedName: "abbreviated_name", + categories: ["hris"], + image: "image", + squareImage: "square_image", + color: "color", + slug: "slug", + apiEndpointsToDocumentationUrls: { + key: "value", + }, + webhookSetupGuideUrl: "webhook_setup_guide_url", + categoryBetaStatus: { + key: "value", + }, + }, + id: "0496d4c2-42e6-4072-80b3-7b69bfdc76fd", + }); + }); +}); diff --git a/tests/wire/knowledgebase/articles.test.ts b/tests/wire/knowledgebase/articles.test.ts new file mode 100644 index 000000000..f4d64e686 --- /dev/null +++ b/tests/wire/knowledgebase/articles.test.ts @@ -0,0 +1,244 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Articles", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + title: "Test Article", + description: "This article describes how Merge is the #1 player in the Unified API space", + author: "author", + last_edited_by: "last_edited_by", + visibility: "PUBLIC", + article_content_download_url: + "https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + checksum: "b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + article_url: "myworkspace.atlassian.net/wiki/test-article", + status: "DRAFT", + type: "PAGE", + remote_created_at: "2021-09-15T00:00:00Z", + remote_updated_at: "2021-09-16T00:00:00Z", + parent_article: "parent_article", + parent_container: "parent_container", + root_container: "root_container", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remote_id: "102895", + created_at: "2020-03-31T00:00:00Z", + modified_at: "2020-06-20T00:00:00Z", + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + }, + ], + attachments: ["640b80b-fac9-409f-aa19-1f9221aec445"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/articles", data: ["Varies by platform"] }], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/articles") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.articles.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + title: "Test Article", + description: "This article describes how Merge is the #1 player in the Unified API space", + author: "author", + lastEditedBy: "last_edited_by", + visibility: "PUBLIC", + articleContentDownloadUrl: + "https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + checksum: "b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + articleUrl: "myworkspace.atlassian.net/wiki/test-article", + status: "DRAFT", + type: "PAGE", + remoteCreatedAt: new Date("2021-09-15T00:00:00.000Z"), + remoteUpdatedAt: new Date("2021-09-16T00:00:00.000Z"), + parentArticle: "parent_article", + parentContainer: "parent_container", + rootContainer: "root_container", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remoteId: "102895", + createdAt: new Date("2020-03-31T00:00:00.000Z"), + modifiedAt: new Date("2020-06-20T00:00:00.000Z"), + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + }, + ], + attachments: ["640b80b-fac9-409f-aa19-1f9221aec445"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/articles", + data: ["Varies by platform"], + }, + ], + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + title: "Test Article", + description: "This article describes how Merge is the #1 player in the Unified API space", + author: "author", + last_edited_by: "last_edited_by", + visibility: "PUBLIC", + article_content_download_url: + "https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + checksum: "b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + article_url: "myworkspace.atlassian.net/wiki/test-article", + status: "DRAFT", + type: "PAGE", + remote_created_at: "2021-09-15T00:00:00Z", + remote_updated_at: "2021-09-16T00:00:00Z", + parent_article: "parent_article", + parent_container: "parent_container", + root_container: "root_container", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remote_id: "102895", + created_at: "2020-03-31T00:00:00Z", + modified_at: "2020-06-20T00:00:00Z", + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + }, + ], + attachments: ["640b80b-fac9-409f-aa19-1f9221aec445"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/articles", data: ["Varies by platform"] }], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/articles/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.articles.retrieve("id"); + expect(response).toEqual({ + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + title: "Test Article", + description: "This article describes how Merge is the #1 player in the Unified API space", + author: "author", + lastEditedBy: "last_edited_by", + visibility: "PUBLIC", + articleContentDownloadUrl: + "https://s3.amazonaws.com/finance-department-bucket/2022/tax-certificate.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + checksum: "b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55", + articleUrl: "myworkspace.atlassian.net/wiki/test-article", + status: "DRAFT", + type: "PAGE", + remoteCreatedAt: new Date("2021-09-15T00:00:00.000Z"), + remoteUpdatedAt: new Date("2021-09-16T00:00:00.000Z"), + parentArticle: "parent_article", + parentContainer: "parent_container", + rootContainer: "root_container", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remoteId: "102895", + createdAt: new Date("2020-03-31T00:00:00.000Z"), + modifiedAt: new Date("2020-06-20T00:00:00.000Z"), + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + }, + ], + attachments: ["640b80b-fac9-409f-aa19-1f9221aec445"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/articles", + data: ["Varies by platform"], + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/asyncPassthrough.test.ts b/tests/wire/knowledgebase/asyncPassthrough.test.ts new file mode 100644 index 000000000..73ba4c985 --- /dev/null +++ b/tests/wire/knowledgebase/asyncPassthrough.test.ts @@ -0,0 +1,71 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("AsyncPassthrough", () => { + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { method: "GET", path: "/scooters" }; + const rawResponseBody = { async_passthrough_receipt_id: "fd29020f-2695-445e-922e-dcd5e81903fd" }; + server + .mockEndpoint() + .post("/knowledgebase/v1/async-passthrough") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.asyncPassthrough.create({ + method: "GET", + path: "/scooters", + }); + expect(response).toEqual({ + asyncPassthroughReceiptId: "fd29020f-2695-445e-922e-dcd5e81903fd", + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + method: "GET", + path: "/scooters", + status: 200, + response: { key: "value" }, + response_headers: { "X-Page-Token": "value" }, + response_type: "JSON", + headers: { "EXTRA-HEADER": "value", Authorization: "" }, + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/async-passthrough/async_passthrough_receipt_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.asyncPassthrough.retrieve("async_passthrough_receipt_id"); + expect(response).toEqual({ + method: "GET", + path: "/scooters", + status: 200, + response: { + key: "value", + }, + responseHeaders: { + "X-Page-Token": "value", + }, + responseType: "JSON", + headers: { + "EXTRA-HEADER": "value", + Authorization: "", + }, + }); + }); +}); diff --git a/tests/wire/knowledgebase/attachments.test.ts b/tests/wire/knowledgebase/attachments.test.ts new file mode 100644 index 000000000..b0a7b9d01 --- /dev/null +++ b/tests/wire/knowledgebase/attachments.test.ts @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Attachments", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "c640b80b-fac9-409f-aa19-1f9221aec445", + remote_id: "11167", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Article spec", + description: "This is an example attachment.", + attachment_url: "https://example.com/attachments/2039349", + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/attachments", data: ["Varies by platform"] }], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/attachments") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.attachments.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + 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: "Article spec", + description: "This is an example attachment.", + attachmentUrl: "https://example.com/attachments/2039349", + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/attachments", + data: ["Varies by platform"], + }, + ], + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "c640b80b-fac9-409f-aa19-1f9221aec445", + remote_id: "11167", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Article spec", + description: "This is an example attachment.", + attachment_url: "https://example.com/attachments/2039349", + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/attachments", data: ["Varies by platform"] }], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/attachments/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.attachments.retrieve("id"); + expect(response).toEqual({ + 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: "Article spec", + description: "This is an example attachment.", + attachmentUrl: "https://example.com/attachments/2039349", + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/attachments", + data: ["Varies by platform"], + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/auditTrail.test.ts b/tests/wire/knowledgebase/auditTrail.test.ts new file mode 100644 index 000000000..952339e4a --- /dev/null +++ b/tests/wire/knowledgebase/auditTrail.test.ts @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("AuditTrail", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "b5ceea2a-7171-47ce-8090-165cfce5572c", + user_name: "Gil Feig", + user_email: "hello@merge.dev", + role: "ADMIN", + ip_address: "192.0.2.123", + event_type: "CREATED_REMOTE_PRODUCTION_API_KEY", + event_description: + "Organization-wide Scopes for model hris.Employee updated from Read to Read+Write", + created_at: "2024-01-15T09:30:00Z", + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/audit-trail") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.auditTrail.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "b5ceea2a-7171-47ce-8090-165cfce5572c", + userName: "Gil Feig", + userEmail: "hello@merge.dev", + role: "ADMIN", + ipAddress: "192.0.2.123", + eventType: "CREATED_REMOTE_PRODUCTION_API_KEY", + eventDescription: + "Organization-wide Scopes for model hris.Employee updated from Read to Read+Write", + createdAt: new Date("2024-01-15T09:30:00.000Z"), + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/availableActions.test.ts b/tests/wire/knowledgebase/availableActions.test.ts new file mode 100644 index 000000000..1c7cbe96c --- /dev/null +++ b/tests/wire/knowledgebase/availableActions.test.ts @@ -0,0 +1,73 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("AvailableActions", () => { + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + integration: { + name: "name", + abbreviated_name: "abbreviated_name", + categories: ["hris"], + image: "image", + square_image: "square_image", + color: "color", + slug: "slug", + api_endpoints_to_documentation_urls: { key: "value" }, + webhook_setup_guide_url: "webhook_setup_guide_url", + category_beta_status: { key: "value" }, + }, + passthrough_available: true, + available_model_operations: [ + { + model_name: "Candidate", + available_operations: ["FETCH", "CREATE"], + required_post_parameters: ["remote_user_id"], + supported_fields: ["first_name", "last_name", "company", "title"], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/available-actions") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.availableActions.retrieve(); + expect(response).toEqual({ + integration: { + name: "name", + abbreviatedName: "abbreviated_name", + categories: ["hris"], + image: "image", + squareImage: "square_image", + color: "color", + slug: "slug", + apiEndpointsToDocumentationUrls: { + key: "value", + }, + webhookSetupGuideUrl: "webhook_setup_guide_url", + categoryBetaStatus: { + key: "value", + }, + }, + passthroughAvailable: true, + availableModelOperations: [ + { + modelName: "Candidate", + availableOperations: ["FETCH", "CREATE"], + requiredPostParameters: ["remote_user_id"], + supportedFields: ["first_name", "last_name", "company", "title"], + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/containers.test.ts b/tests/wire/knowledgebase/containers.test.ts new file mode 100644 index 000000000..ae1225ca5 --- /dev/null +++ b/tests/wire/knowledgebase/containers.test.ts @@ -0,0 +1,220 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Containers", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Test Container", + description: + "This folder contains articles that describe how Merge is the #1 player in the Unified API space", + status: "DRAFT", + container_url: "myworkspace.atlassian.net/wiki/test-container", + type: "FOLDER", + visibility: "PUBLIC", + remote_created_at: "2021-09-15T00:00:00Z", + remote_updated_at: "2021-09-16T00:00:00Z", + parent_article: "parent_article", + parent_container: "8e889422-e086-42dc-b99e-24d732039b0b", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remote_id: "102895", + created_at: "2020-03-31T00:00:00Z", + modified_at: "2020-06-20T00:00:00Z", + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + }, + ], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/containers", data: ["Varies by platform"] }], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/containers") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.containers.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Test Container", + description: + "This folder contains articles that describe how Merge is the #1 player in the Unified API space", + status: "DRAFT", + containerUrl: "myworkspace.atlassian.net/wiki/test-container", + type: "FOLDER", + visibility: "PUBLIC", + remoteCreatedAt: new Date("2021-09-15T00:00:00.000Z"), + remoteUpdatedAt: new Date("2021-09-16T00:00:00.000Z"), + parentArticle: "parent_article", + parentContainer: "8e889422-e086-42dc-b99e-24d732039b0b", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remoteId: "102895", + createdAt: new Date("2020-03-31T00:00:00.000Z"), + modifiedAt: new Date("2020-06-20T00:00:00.000Z"), + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + }, + ], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/containers", + data: ["Varies by platform"], + }, + ], + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Test Container", + description: + "This folder contains articles that describe how Merge is the #1 player in the Unified API space", + status: "DRAFT", + container_url: "myworkspace.atlassian.net/wiki/test-container", + type: "FOLDER", + visibility: "PUBLIC", + remote_created_at: "2021-09-15T00:00:00Z", + remote_updated_at: "2021-09-16T00:00:00Z", + parent_article: "parent_article", + parent_container: "8e889422-e086-42dc-b99e-24d732039b0b", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remote_id: "102895", + created_at: "2020-03-31T00:00:00Z", + modified_at: "2020-06-20T00:00:00Z", + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + }, + ], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/containers", data: ["Varies by platform"] }], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/containers/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.containers.retrieve("id"); + expect(response).toEqual({ + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Test Container", + description: + "This folder contains articles that describe how Merge is the #1 player in the Unified API space", + status: "DRAFT", + containerUrl: "myworkspace.atlassian.net/wiki/test-container", + type: "FOLDER", + visibility: "PUBLIC", + remoteCreatedAt: new Date("2021-09-15T00:00:00.000Z"), + remoteUpdatedAt: new Date("2021-09-16T00:00:00.000Z"), + parentArticle: "parent_article", + parentContainer: "8e889422-e086-42dc-b99e-24d732039b0b", + permissions: [ + { + id: "31ce489c-asdf-68b1-754r-629f799f7123", + remoteId: "102895", + createdAt: new Date("2020-03-31T00:00:00.000Z"), + modifiedAt: new Date("2020-06-20T00:00:00.000Z"), + user: "21ce474c-asdf-34a2-754r-629f799f7d12", + type: "USER", + roles: ["OWNER"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + }, + ], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/containers", + data: ["Varies by platform"], + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/deleteAccount.test.ts b/tests/wire/knowledgebase/deleteAccount.test.ts new file mode 100644 index 000000000..404044072 --- /dev/null +++ b/tests/wire/knowledgebase/deleteAccount.test.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("DeleteAccount", () => { + test("delete", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + server.mockEndpoint().post("/knowledgebase/v1/delete-account").respondWith().statusCode(200).build(); + + const response = await client.knowledgebase.deleteAccount.delete(); + expect(response).toEqual(undefined); + }); +}); diff --git a/tests/wire/knowledgebase/fieldMapping.test.ts b/tests/wire/knowledgebase/fieldMapping.test.ts new file mode 100644 index 000000000..3cef4141e --- /dev/null +++ b/tests/wire/knowledgebase/fieldMapping.test.ts @@ -0,0 +1,882 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("FieldMapping", () => { + test("field_mappings_retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + Container: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + ], + Article: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + ], + Attachment: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + ], + User: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + ], + Group: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/field-mappings") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.fieldMapping.fieldMappingsRetrieve(); + expect(response).toEqual({ + container: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + ], + article: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + ], + attachment: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + ], + user: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + ], + group: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + ], + }); + }); + + test("field_mappings_create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { + target_field_name: "example_target_field_name", + target_field_description: "this is a example description of the target field", + remote_field_traversal_path: ["example_remote_field"], + remote_method: "GET", + remote_url_path: "/example-url-path", + common_model_name: "ExampleCommonModel", + }; + const rawResponseBody = { + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + warnings: [ + { + source: { pointer: "pointer" }, + title: "Unrecognized Field", + detail: "An unrecognized field, age, was passed in with request data.", + problem_type: "UNRECOGNIZED_FIELD", + }, + ], + 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() + .post("/knowledgebase/v1/field-mappings") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.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", + }); + expect(response).toEqual({ + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + 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("field_mappings_destroy", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + warnings: [ + { + source: { pointer: "pointer" }, + title: "Unrecognized Field", + detail: "An unrecognized field, age, was passed in with request data.", + problem_type: "UNRECOGNIZED_FIELD", + }, + ], + 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() + .delete("/knowledgebase/v1/field-mappings/field_mapping_id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.fieldMapping.fieldMappingsDestroy("field_mapping_id"); + expect(response).toEqual({ + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + 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("field_mappings_partial_update", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = {}; + const rawResponseBody = { + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + is_integration_wide: true, + target_field: { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_organization_wide: true, + }, + remote_field: { + remote_key_name: "example_remote_field_key", + schema: { type: "string" }, + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_remote_field_key"], + }, + }, + jmes_path: "[0].example_jmes_path", + }, + warnings: [ + { + source: { pointer: "pointer" }, + title: "Unrecognized Field", + detail: "An unrecognized field, age, was passed in with request data.", + problem_type: "UNRECOGNIZED_FIELD", + }, + ], + 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("/knowledgebase/v1/field-mappings/field_mapping_id") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.fieldMapping.fieldMappingsPartialUpdate("field_mapping_id"); + expect(response).toEqual({ + model: { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + isIntegrationWide: true, + targetField: { + name: "example_target_field_name", + description: "this is a example description of a target field", + isOrganizationWide: true, + }, + remoteField: { + remoteKeyName: "example_remote_field_key", + schema: { + type: "string", + }, + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_remote_field_key"], + }, + }, + jmesPath: "[0].example_jmes_path", + }, + 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("remote_fields_retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + Container: [ + { + schema: { type: "string" }, + remote_key_name: "example_remote_key_name", + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_key_name"], + }, + example_values: ["example"], + advanced_metadata: { id: "id" }, + coverage: 1, + }, + ], + Article: [ + { + schema: { type: "string" }, + remote_key_name: "example_remote_key_name", + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_key_name"], + }, + example_values: ["example"], + advanced_metadata: { id: "id" }, + coverage: 1, + }, + ], + Attachment: [ + { + schema: { type: "string" }, + remote_key_name: "example_remote_key_name", + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_key_name"], + }, + example_values: ["example"], + advanced_metadata: { id: "id" }, + coverage: 1, + }, + ], + User: [ + { + schema: { type: "string" }, + remote_key_name: "example_remote_key_name", + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_key_name"], + }, + example_values: ["example"], + advanced_metadata: { id: "id" }, + coverage: 1, + }, + ], + Group: [ + { + schema: { type: "string" }, + remote_key_name: "example_remote_key_name", + remote_endpoint_info: { + method: "GET", + url_path: "/example-url-path", + field_traversal_path: ["example_key_name"], + }, + example_values: ["example"], + advanced_metadata: { id: "id" }, + coverage: 1, + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/remote-fields") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.fieldMapping.remoteFieldsRetrieve(); + expect(response).toEqual({ + container: [ + { + schema: { + type: "string", + }, + remoteKeyName: "example_remote_key_name", + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_key_name"], + }, + exampleValues: ["example"], + advancedMetadata: { + id: "id", + }, + coverage: 1, + }, + ], + article: [ + { + schema: { + type: "string", + }, + remoteKeyName: "example_remote_key_name", + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_key_name"], + }, + exampleValues: ["example"], + advancedMetadata: { + id: "id", + }, + coverage: 1, + }, + ], + attachment: [ + { + schema: { + type: "string", + }, + remoteKeyName: "example_remote_key_name", + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_key_name"], + }, + exampleValues: ["example"], + advancedMetadata: { + id: "id", + }, + coverage: 1, + }, + ], + user: [ + { + schema: { + type: "string", + }, + remoteKeyName: "example_remote_key_name", + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_key_name"], + }, + exampleValues: ["example"], + advancedMetadata: { + id: "id", + }, + coverage: 1, + }, + ], + group: [ + { + schema: { + type: "string", + }, + remoteKeyName: "example_remote_key_name", + remoteEndpointInfo: { + method: "GET", + urlPath: "/example-url-path", + fieldTraversalPath: ["example_key_name"], + }, + exampleValues: ["example"], + advancedMetadata: { + id: "id", + }, + coverage: 1, + }, + ], + }); + }); + + test("target_fields_retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + Container: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_mapped: "is_mapped", + }, + ], + Article: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_mapped: "is_mapped", + }, + ], + Attachment: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_mapped: "is_mapped", + }, + ], + User: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_mapped: "is_mapped", + }, + ], + Group: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + is_mapped: "is_mapped", + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/target-fields") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.fieldMapping.targetFieldsRetrieve(); + expect(response).toEqual({ + container: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + isMapped: "is_mapped", + }, + ], + article: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + isMapped: "is_mapped", + }, + ], + attachment: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + isMapped: "is_mapped", + }, + ], + user: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + isMapped: "is_mapped", + }, + ], + group: [ + { + name: "example_target_field_name", + description: "this is a example description of a target field", + isMapped: "is_mapped", + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/forceResync.test.ts b/tests/wire/knowledgebase/forceResync.test.ts new file mode 100644 index 000000000..0af97e55d --- /dev/null +++ b/tests/wire/knowledgebase/forceResync.test.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("ForceResync", () => { + test("sync_status_resync_create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = [ + { + model_name: "Article", + model_id: "knowledgebase.KnowledgeBaseArticle", + last_sync_start: "2021-03-30T19:44:18Z", + next_sync_start: "2021-03-30T20:44:18Z", + last_sync_result: "SYNCING", + last_sync_finished: "2021-03-30T19:55:18Z", + status: "SYNCING", + is_initial_sync: true, + selective_sync_configurations_usage: "IN_NEXT_SYNC", + }, + ]; + server + .mockEndpoint() + .post("/knowledgebase/v1/sync-status/resync") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.forceResync.syncStatusResyncCreate(); + expect(response).toEqual([ + { + modelName: "Article", + modelId: "knowledgebase.KnowledgeBaseArticle", + lastSyncStart: new Date("2021-03-30T19:44:18.000Z"), + nextSyncStart: new Date("2021-03-30T20:44:18.000Z"), + lastSyncResult: "SYNCING", + lastSyncFinished: new Date("2021-03-30T19:55:18.000Z"), + status: "SYNCING", + isInitialSync: true, + selectiveSyncConfigurationsUsage: "IN_NEXT_SYNC", + }, + ]); + }); +}); diff --git a/tests/wire/knowledgebase/generateKey.test.ts b/tests/wire/knowledgebase/generateKey.test.ts new file mode 100644 index 000000000..0e534c088 --- /dev/null +++ b/tests/wire/knowledgebase/generateKey.test.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("GenerateKey", () => { + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "Remote Deployment Key 1" }; + const rawResponseBody = { + name: "Remote Deployment Key 1", + key: "hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA", + }; + server + .mockEndpoint() + .post("/knowledgebase/v1/generate-key") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.generateKey.create({ + name: "Remote Deployment Key 1", + }); + expect(response).toEqual({ + name: "Remote Deployment Key 1", + key: "hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA", + }); + }); +}); diff --git a/tests/wire/knowledgebase/groups.test.ts b/tests/wire/knowledgebase/groups.test.ts new file mode 100644 index 000000000..fafb5adfa --- /dev/null +++ b/tests/wire/knowledgebase/groups.test.ts @@ -0,0 +1,130 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Groups", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Engineering", + parent_group: "parent_group", + users: ["6e93361b-8ae7-444b-bfa2-71206cbbee24", "a1f90b3c-633d-404e-a696-05cd54808676"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/groups", data: ["Varies by platform"] }], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/groups") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.groups.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Engineering", + parentGroup: "parent_group", + users: ["6e93361b-8ae7-444b-bfa2-71206cbbee24", "a1f90b3c-633d-404e-a696-05cd54808676"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/groups", + data: ["Varies by platform"], + }, + ], + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remote_id: "800293", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Engineering", + parent_group: "parent_group", + users: ["6e93361b-8ae7-444b-bfa2-71206cbbee24", "a1f90b3c-633d-404e-a696-05cd54808676"], + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + remote_data: [{ path: "/groups", data: ["Varies by platform"] }], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/groups/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.groups.retrieve("id"); + expect(response).toEqual({ + id: "134e0111-0f67-44f6-98f0-597000290bb3", + remoteId: "800293", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Engineering", + parentGroup: "parent_group", + users: ["6e93361b-8ae7-444b-bfa2-71206cbbee24", "a1f90b3c-633d-404e-a696-05cd54808676"], + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + remoteData: [ + { + path: "/groups", + data: ["Varies by platform"], + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/issues.test.ts b/tests/wire/knowledgebase/issues.test.ts new file mode 100644 index 000000000..5e04df231 --- /dev/null +++ b/tests/wire/knowledgebase/issues.test.ts @@ -0,0 +1,96 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Issues", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + status: "ONGOING", + error_description: "Missing Permissions", + end_user: { key: "value" }, + first_incident_time: "2022-12-05T16:19:15Z", + last_incident_time: "2022-12-05T16:19:15Z", + is_muted: true, + error_details: ["Missing employee permissions.", "Missing time off permissions."], + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/issues") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.issues.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + status: "ONGOING", + errorDescription: "Missing Permissions", + endUser: { + key: "value", + }, + firstIncidentTime: new Date("2022-12-05T16:19:15.000Z"), + lastIncidentTime: new Date("2022-12-05T16:19:15.000Z"), + isMuted: true, + errorDetails: ["Missing employee permissions.", "Missing time off permissions."], + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + status: "ONGOING", + error_description: "Missing Permissions", + end_user: { key: "value" }, + first_incident_time: "2022-12-05T16:19:15Z", + last_incident_time: "2022-12-05T16:19:15Z", + is_muted: true, + error_details: ["Missing employee permissions.", "Missing time off permissions."], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/issues/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.issues.retrieve("id"); + expect(response).toEqual({ + id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", + status: "ONGOING", + errorDescription: "Missing Permissions", + endUser: { + key: "value", + }, + firstIncidentTime: new Date("2022-12-05T16:19:15.000Z"), + lastIncidentTime: new Date("2022-12-05T16:19:15.000Z"), + isMuted: true, + errorDetails: ["Missing employee permissions.", "Missing time off permissions."], + }); + }); +}); diff --git a/tests/wire/knowledgebase/linkToken.test.ts b/tests/wire/knowledgebase/linkToken.test.ts new file mode 100644 index 000000000..2127e6788 --- /dev/null +++ b/tests/wire/knowledgebase/linkToken.test.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("LinkToken", () => { + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { + end_user_email_address: "example@gmail.com", + end_user_organization_name: "Test Organization", + end_user_origin_id: "12345", + categories: ["hris", "ats"], + }; + const rawResponseBody = { + link_token: "necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0", + integration_name: "Lever", + magic_link_url: "https://link.merge.dev/asdfjkl12345jsndfgi2i83n", + }; + server + .mockEndpoint() + .post("/knowledgebase/v1/link-token") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.linkToken.create({ + endUserEmailAddress: "example@gmail.com", + endUserOrganizationName: "Test Organization", + endUserOriginId: "12345", + categories: ["hris", "ats"], + }); + expect(response).toEqual({ + linkToken: "necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0", + integrationName: "Lever", + magicLinkUrl: "https://link.merge.dev/asdfjkl12345jsndfgi2i83n", + }); + }); +}); diff --git a/tests/wire/knowledgebase/linkedAccounts.test.ts b/tests/wire/knowledgebase/linkedAccounts.test.ts new file mode 100644 index 000000000..e600d3269 --- /dev/null +++ b/tests/wire/knowledgebase/linkedAccounts.test.ts @@ -0,0 +1,99 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("LinkedAccounts", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "e59b1821-f85c-4e28-a6b3-1804156f3563", + category: "hris", + status: "COMPLETE", + status_detail: "Invalid login credentials", + end_user_origin_id: "3ac95cde-6c7f-4eef-afec-be710b42308d", + end_user_organization_name: "Foo Bar, LLC", + end_user_email_address: "hradmin@foobar.dev", + subdomain: "foobar", + webhook_listener_url: "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + is_duplicate: true, + integration: { + name: "name", + categories: ["hris"], + color: "color", + slug: "slug", + passthrough_available: true, + available_model_operations: [ + { + model_name: "Candidate", + available_operations: ["FETCH", "CREATE"], + required_post_parameters: ["remote_user_id"], + supported_fields: ["first_name", "last_name", "company", "title"], + }, + ], + }, + account_type: "PRODUCTION", + completed_at: "2024-08-26T20:11:19Z", + integration_specific_fields: { integration_specific_field: "Varies by platform" }, + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/linked-accounts") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.linkedAccounts.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "e59b1821-f85c-4e28-a6b3-1804156f3563", + category: "hris", + status: "COMPLETE", + statusDetail: "Invalid login credentials", + endUserOriginId: "3ac95cde-6c7f-4eef-afec-be710b42308d", + endUserOrganizationName: "Foo Bar, LLC", + endUserEmailAddress: "hradmin@foobar.dev", + subdomain: "foobar", + webhookListenerUrl: "https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4", + isDuplicate: true, + integration: { + name: "name", + categories: ["hris"], + color: "color", + slug: "slug", + passthroughAvailable: true, + availableModelOperations: [ + { + modelName: "Candidate", + availableOperations: ["FETCH", "CREATE"], + requiredPostParameters: ["remote_user_id"], + supportedFields: ["first_name", "last_name", "company", "title"], + }, + ], + }, + accountType: "PRODUCTION", + completedAt: new Date("2024-08-26T20:11:19.000Z"), + integrationSpecificFields: { + integration_specific_field: "Varies by platform", + }, + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/passthrough.test.ts b/tests/wire/knowledgebase/passthrough.test.ts new file mode 100644 index 000000000..5343b9a1f --- /dev/null +++ b/tests/wire/knowledgebase/passthrough.test.ts @@ -0,0 +1,52 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Passthrough", () => { + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { method: "GET", path: "/scooters" }; + const rawResponseBody = { + method: "GET", + path: "/scooters", + status: 200, + response: { key: "value" }, + response_headers: { "X-Page-Token": "value" }, + response_type: "JSON", + headers: { "EXTRA-HEADER": "value", Authorization: "" }, + }; + server + .mockEndpoint() + .post("/knowledgebase/v1/passthrough") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.passthrough.create({ + method: "GET", + path: "/scooters", + }); + expect(response).toEqual({ + method: "GET", + path: "/scooters", + status: 200, + response: { + key: "value", + }, + responseHeaders: { + "X-Page-Token": "value", + }, + responseType: "JSON", + headers: { + "EXTRA-HEADER": "value", + Authorization: "", + }, + }); + }); +}); diff --git a/tests/wire/knowledgebase/regenerateKey.test.ts b/tests/wire/knowledgebase/regenerateKey.test.ts new file mode 100644 index 000000000..04db34aac --- /dev/null +++ b/tests/wire/knowledgebase/regenerateKey.test.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("RegenerateKey", () => { + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { name: "Remote Deployment Key 1" }; + const rawResponseBody = { + name: "Remote Deployment Key 1", + key: "hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA", + }; + server + .mockEndpoint() + .post("/knowledgebase/v1/regenerate-key") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.regenerateKey.create({ + name: "Remote Deployment Key 1", + }); + expect(response).toEqual({ + name: "Remote Deployment Key 1", + key: "hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA", + }); + }); +}); diff --git a/tests/wire/knowledgebase/scopes.test.ts b/tests/wire/knowledgebase/scopes.test.ts new file mode 100644 index 000000000..0101d4ab4 --- /dev/null +++ b/tests/wire/knowledgebase/scopes.test.ts @@ -0,0 +1,281 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Scopes", () => { + test("default_scopes_retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + common_models: [ + { + model_name: "Employee", + model_permissions: { READ: { is_enabled: true }, WRITE: { is_enabled: false } }, + field_permissions: { + enabled_fields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabled_fields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/default-scopes") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.scopes.defaultScopesRetrieve(); + expect(response).toEqual({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabledFields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }); + }); + + test("linked_account_scopes_retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + common_models: [ + { + model_name: "Employee", + model_permissions: { READ: { is_enabled: true }, WRITE: { is_enabled: false } }, + field_permissions: { + enabled_fields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabled_fields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/linked-account-scopes") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.scopes.linkedAccountScopesRetrieve(); + expect(response).toEqual({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabledFields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }); + }); + + test("linked_account_scopes_create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { + common_models: [ + { + model_name: "Employee", + model_permissions: { READ: { is_enabled: true }, WRITE: { is_enabled: false } }, + field_permissions: { + enabled_fields: ["avatar", "home_location"], + disabled_fields: ["work_location"], + }, + }, + { model_name: "Benefit", model_permissions: { WRITE: { is_enabled: false } } }, + ], + }; + const rawResponseBody = { + common_models: [ + { + model_name: "Employee", + model_permissions: { READ: { is_enabled: true }, WRITE: { is_enabled: false } }, + field_permissions: { + enabled_fields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabled_fields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }; + server + .mockEndpoint() + .post("/knowledgebase/v1/linked-account-scopes") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.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, + }, + }, + }, + ], + }); + expect(response).toEqual({ + commonModels: [ + { + modelName: "Employee", + modelPermissions: { + READ: { + isEnabled: true, + }, + WRITE: { + isEnabled: false, + }, + }, + fieldPermissions: { + enabledFields: [ + "avatar", + "created_at", + "custom_fields", + "date_of_birth", + "first_name", + "gender", + "remote_created_at", + "remote_data", + ], + disabledFields: [ + "company", + "employments", + "groups", + "home_location", + "manager", + "work_location", + ], + }, + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/syncStatus.test.ts b/tests/wire/knowledgebase/syncStatus.test.ts new file mode 100644 index 000000000..a3714382f --- /dev/null +++ b/tests/wire/knowledgebase/syncStatus.test.ts @@ -0,0 +1,59 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("SyncStatus", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + model_name: "Article", + model_id: "knowledgebase.KnowledgeBaseArticle", + last_sync_start: "2021-03-30T19:44:18Z", + next_sync_start: "2021-03-30T20:44:18Z", + last_sync_result: "SYNCING", + last_sync_finished: "2021-03-30T19:55:18Z", + status: "SYNCING", + is_initial_sync: true, + selective_sync_configurations_usage: "IN_NEXT_SYNC", + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/sync-status") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.syncStatus.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + modelName: "Article", + modelId: "knowledgebase.KnowledgeBaseArticle", + lastSyncStart: new Date("2021-03-30T19:44:18.000Z"), + nextSyncStart: new Date("2021-03-30T20:44:18.000Z"), + lastSyncResult: "SYNCING", + lastSyncFinished: new Date("2021-03-30T19:55:18.000Z"), + status: "SYNCING", + isInitialSync: true, + selectiveSyncConfigurationsUsage: "IN_NEXT_SYNC", + }, + ], + }); + }); +}); diff --git a/tests/wire/knowledgebase/users.test.ts b/tests/wire/knowledgebase/users.test.ts new file mode 100644 index 000000000..e0d94bcbb --- /dev/null +++ b/tests/wire/knowledgebase/users.test.ts @@ -0,0 +1,112 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("Users", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "83902e75-4362-4803-b76c-a7d6be292cbd", + remote_id: "2039349", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Gil Feig", + email_address: "hello@merge.dev", + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + }, + ], + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/users") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.users.list({ + cursor: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + }); + expect(response).toEqual({ + next: "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw", + previous: "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ", + results: [ + { + id: "83902e75-4362-4803-b76c-a7d6be292cbd", + remoteId: "2039349", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Gil Feig", + emailAddress: "hello@merge.dev", + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + }, + ], + }); + }); + + test("retrieve", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = { + id: "83902e75-4362-4803-b76c-a7d6be292cbd", + remote_id: "2039349", + created_at: "2021-09-15T00:00:00Z", + modified_at: "2021-10-16T00:00:00Z", + name: "Gil Feig", + email_address: "hello@merge.dev", + remote_was_deleted: true, + field_mappings: { + organization_defined_targets: { custom_key: "custom_value" }, + linked_account_defined_targets: { custom_key: "custom_value" }, + }, + }; + server + .mockEndpoint() + .get("/knowledgebase/v1/users/id") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.users.retrieve("id"); + expect(response).toEqual({ + id: "83902e75-4362-4803-b76c-a7d6be292cbd", + remoteId: "2039349", + createdAt: new Date("2021-09-15T00:00:00.000Z"), + modifiedAt: new Date("2021-10-16T00:00:00.000Z"), + name: "Gil Feig", + emailAddress: "hello@merge.dev", + remoteWasDeleted: true, + fieldMappings: { + organization_defined_targets: { + custom_key: "custom_value", + }, + linked_account_defined_targets: { + custom_key: "custom_value", + }, + }, + }); + }); +}); diff --git a/tests/wire/knowledgebase/webhookReceivers.test.ts b/tests/wire/knowledgebase/webhookReceivers.test.ts new file mode 100644 index 000000000..86df27ff0 --- /dev/null +++ b/tests/wire/knowledgebase/webhookReceivers.test.ts @@ -0,0 +1,56 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import { mockServerPool } from "../../mock-server/MockServerPool"; +import { MergeClient } from "../../../src/Client"; + +describe("WebhookReceivers", () => { + test("list", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + + const rawResponseBody = [{ event: "event", is_active: true, key: "key" }]; + server + .mockEndpoint() + .get("/knowledgebase/v1/webhook-receivers") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.webhookReceivers.list(); + expect(response).toEqual([ + { + event: "event", + isActive: true, + key: "key", + }, + ]); + }); + + test("create", async () => { + const server = mockServerPool.createServer(); + const client = new MergeClient({ apiKey: "test", accountToken: "test", environment: server.baseUrl }); + const rawRequestBody = { event: "event", is_active: true }; + const rawResponseBody = { event: "event", is_active: true, key: "key" }; + server + .mockEndpoint() + .post("/knowledgebase/v1/webhook-receivers") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.knowledgebase.webhookReceivers.create({ + event: "event", + isActive: true, + }); + expect(response).toEqual({ + event: "event", + isActive: true, + key: "key", + }); + }); +}); diff --git a/tests/wire/ticketing/collections.test.ts b/tests/wire/ticketing/collections.test.ts index a17087fc2..3601533cd 100644 --- a/tests/wire/ticketing/collections.test.ts +++ b/tests/wire/ticketing/collections.test.ts @@ -24,6 +24,9 @@ describe("Collections", () => { access_level: "PRIVATE", collection_type: "LIST", parent_collection: "parent_collection", + collection_url: "https://example.com", + remote_created_at: "2022-01-01T00:00:00Z", + remote_updated_at: "2022-01-01T00:00:00Z", remote_was_deleted: true, field_mappings: { organization_defined_targets: { custom_key: "custom_value" }, @@ -58,6 +61,9 @@ describe("Collections", () => { accessLevel: "PRIVATE", collectionType: "LIST", parentCollection: "parent_collection", + collectionUrl: "https://example.com", + remoteCreatedAt: new Date("2022-01-01T00:00:00.000Z"), + remoteUpdatedAt: new Date("2022-01-01T00:00:00.000Z"), remoteWasDeleted: true, fieldMappings: { organization_defined_targets: { @@ -136,6 +142,9 @@ describe("Collections", () => { access_level: "PRIVATE", collection_type: "LIST", parent_collection: "parent_collection", + collection_url: "https://example.com", + remote_created_at: "2022-01-01T00:00:00Z", + remote_updated_at: "2022-01-01T00:00:00Z", remote_was_deleted: true, field_mappings: { organization_defined_targets: { custom_key: "custom_value" }, @@ -162,6 +171,9 @@ describe("Collections", () => { accessLevel: "PRIVATE", collectionType: "LIST", parentCollection: "parent_collection", + collectionUrl: "https://example.com", + remoteCreatedAt: new Date("2022-01-01T00:00:00.000Z"), + remoteUpdatedAt: new Date("2022-01-01T00:00:00.000Z"), remoteWasDeleted: true, fieldMappings: { organization_defined_targets: { diff --git a/yarn.lock b/yarn.lock index be449d538..dade6d7aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,14 +2,6 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.2.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" @@ -20,25 +12,25 @@ picocolors "^1.1.1" "@babel/compat-data@^7.27.2": - version "7.28.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.0.tgz#9fc6fd58c2a6a15243cd13983224968392070790" - integrity sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw== + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.4.tgz#96fdf1af1b8859c8474ab39c295312bfb7c24b04" + integrity sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.3.tgz#aceddde69c5d1def69b839d09efa3e3ff59c97cb" - integrity sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ== + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.4.tgz#12a550b8794452df4c8b084f95003bce1742d496" + integrity sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA== dependencies: - "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.27.1" "@babel/generator" "^7.28.3" "@babel/helper-compilation-targets" "^7.27.2" "@babel/helper-module-transforms" "^7.28.3" - "@babel/helpers" "^7.28.3" - "@babel/parser" "^7.28.3" + "@babel/helpers" "^7.28.4" + "@babel/parser" "^7.28.4" "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.3" - "@babel/types" "^7.28.2" + "@babel/traverse" "^7.28.4" + "@babel/types" "^7.28.4" + "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -109,20 +101,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.3.tgz#b83156c0a2232c133d1b535dd5d3452119c7e441" - integrity sha512-PTNtvUQihsAsDHMOP5pfobP8C6CM4JWXmP8DrEIt46c3r2bf87Ua1zoqevsMo9g+tWDwgWrFP5EIxuBx5RudAw== +"@babel/helpers@^7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== dependencies: "@babel/template" "^7.27.2" - "@babel/types" "^7.28.2" + "@babel/types" "^7.28.4" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.3.tgz#d2d25b814621bca5fe9d172bc93792547e7a2a71" - integrity sha512-7+Ey1mAgYqFAx2h0RuoxcQT5+MlG3GTV0TQrgr7/ZliKsm/MNDxVVutlWaziMq7wJNAz8MTqz55XLpWvva6StA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3", "@babel/parser@^7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8" + integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg== dependencies: - "@babel/types" "^7.28.2" + "@babel/types" "^7.28.4" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -252,23 +244,23 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.3.tgz#6911a10795d2cce43ec6a28cffc440cca2593434" - integrity sha512-7w4kZYHneL3A6NP2nxzHvT3HCZ7puDZZjFMqDpBPECub79sTtSO5CGXDkKrTQq8ksAwfD/XI2MRFX23njdDaIQ== +"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.4": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.4.tgz#8d456101b96ab175d487249f60680221692b958b" + integrity sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ== dependencies: "@babel/code-frame" "^7.27.1" "@babel/generator" "^7.28.3" "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.3" + "@babel/parser" "^7.28.4" "@babel/template" "^7.27.2" - "@babel/types" "^7.28.2" + "@babel/types" "^7.28.4" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.3.3": - version "7.28.2" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.2.tgz#da9db0856a9a88e0a13b019881d7513588cf712b" - integrity sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4", "@babel/types@^7.3.3": + version "7.28.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a" + integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== dependencies: "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" @@ -292,22 +284,27 @@ dependencies: statuses "^2.0.1" +"@inquirer/ansi@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.0.tgz#29525c673caf36c12e719712830705b9c31f0462" + integrity sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA== + "@inquirer/confirm@^5.0.0": - version "5.1.16" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.16.tgz#4f99603e5c8a1b471b819343f708c75e8abd2b88" - integrity sha512-j1a5VstaK5KQy8Mu8cHmuQvN1Zc62TbLhjJxwHvKPPKEoowSF6h/0UdOpA9DNdWZ+9Inq73+puRq1df6OJ8Sag== + version "5.1.18" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.18.tgz#0b76e5082d834c0e3528023705b867fc1222d535" + integrity sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw== dependencies: - "@inquirer/core" "^10.2.0" + "@inquirer/core" "^10.2.2" "@inquirer/type" "^3.0.8" -"@inquirer/core@^10.2.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.2.0.tgz#19ff527dbe0956891d825e320ecbc890bd6a1550" - integrity sha512-NyDSjPqhSvpZEMZrLCYUquWNl+XC/moEcVFqS55IEYIYsY0a1cUCevSqk7ctOlnm/RaSBU5psFryNlxcmGrjaA== +"@inquirer/core@^10.2.2": + version "10.2.2" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.2.2.tgz#d31eb50ba0c76b26e7703c2c0d1d0518144c23ab" + integrity sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA== dependencies: + "@inquirer/ansi" "^1.0.0" "@inquirer/figures" "^1.0.13" "@inquirer/type" "^3.0.8" - ansi-escapes "^4.3.2" cli-width "^4.1.0" mute-stream "^2.0.0" signal-exit "^4.1.0" @@ -540,6 +537,14 @@ "@jridgewell/sourcemap-codec" "^1.5.0" "@jridgewell/trace-mapping" "^0.3.24" +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" @@ -559,9 +564,9 @@ integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.28": - version "0.3.30" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz#4a76c4daeee5df09f5d3940e087442fb36ce2b99" - integrity sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q== + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -591,7 +596,7 @@ is-node-process "^1.2.0" outvariant "^1.4.0" -"@open-draft/until@^2.0.0", "@open-draft/until@^2.1.0": +"@open-draft/until@^2.0.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-2.1.0.tgz#0acf32f470af2ceaf47f095cdecd40d68666efda" integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== @@ -736,16 +741,16 @@ form-data "^4.0.4" "@types/node@*": - 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== + version "24.5.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.5.2.tgz#52ceb83f50fe0fcfdfbd2a9fab6db2e9e7ef6446" + integrity sha512-FYxk1I7wPv3K2XBaoyH2cTnocQEu8AOZ60hPbsyukMPLv5/5qr7V1i8PLHdl6Zf87I+xZXFvPCXYjiTFq+YSDQ== dependencies: - undici-types "~7.10.0" + undici-types "~7.12.0" "@types/node@^18.19.70": - version "18.19.124" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.124.tgz#6f49e4fab8274910691a900e8a14316cbf3c7a31" - integrity sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ== + version "18.19.127" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.127.tgz#7c2e47fa79ad7486134700514d4a975c4607f09d" + integrity sha512-gSjxjrnKXML/yo0BO099uPixMqfpJU0TKYjpfLU7TrtA2WWDki412Np/RSTPRil1saKBhvVVKzVx/p/6p94nVA== dependencies: undici-types "~5.26.4" @@ -982,7 +987,7 @@ ajv@^8.0.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" -ansi-escapes@^4.2.1, ansi-escapes@^4.3.2: +ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -1099,6 +1104,11 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +baseline-browser-mapping@^2.8.3: + version "2.8.6" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.6.tgz#c37dea4291ed8d01682f85661dbe87967028642e" + integrity sha512-wrH5NNqren/QMtKUEEJf7z86YjfqW/2uw3IL3/xpqZUC95SSVIFXYQeeGjL6FT/X68IROu6RMehZQS5foy2BXw== + brace-expansion@^1.1.7: version "1.1.12" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" @@ -1115,13 +1125,14 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0: - version "4.25.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.25.4.tgz#ebdd0e1d1cf3911834bab3a6cd7b917d9babf5af" - integrity sha512-4jYpcjabC606xJ3kw2QwGEZKX0Aw7sgQdZCvIK9dhVSPh76BKo+C+btT1RRofH7B+8iNpEbgGNVWiLki5q93yg== - dependencies: - caniuse-lite "^1.0.30001737" - electron-to-chromium "^1.5.211" - node-releases "^2.0.19" + version "4.26.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.26.2.tgz#7db3b3577ec97f1140a52db4936654911078cef3" + integrity sha512-ECFzp6uFOSB+dcZ5BK/IBaGWssbSYBHvuMeMt3MMFyhI0Z8SqGgEkBLARgpRH3hutIgPVsALcMwbDrJqPxQ65A== + dependencies: + baseline-browser-mapping "^2.8.3" + caniuse-lite "^1.0.30001741" + electron-to-chromium "^1.5.218" + node-releases "^2.0.21" update-browserslist-db "^1.1.3" bs-logger@^0.2.6: @@ -1174,10 +1185,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001737: - 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== +caniuse-lite@^1.0.30001741: + version "1.0.30001743" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001743.tgz#50ff91a991220a1ee2df5af00650dd5c308ea7cd" + integrity sha512-e6Ojr7RV14Un7dz6ASD0aZDmQPT/A+eZU+nuTNfjqmRrmkmQlnTNWH0SKmqagx9PeW87UVqapSurtAXifmtdmw== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1319,9 +1330,9 @@ data-urls@^3.0.2: whatwg-url "^11.0.0" debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" - integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== dependencies: ms "^2.1.3" @@ -1371,10 +1382,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.211: - 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== +electron-to-chromium@^1.5.218: + version "1.5.223" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.223.tgz#cf9b1aebba1c8ee5e50d1c9e198229e15bc87b28" + integrity sha512-qKm55ic6nbEmagFlTFczML33rF90aU+WtrJ9MdTCThrcvDNdUHN4p6QfVN78U06ZmguqXIyMPyYhw2TrbDUwPQ== emittery@^0.13.1: version "0.13.1" @@ -1400,9 +1411,9 @@ entities@^6.0.0: integrity sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g== error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + version "1.3.4" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.4.tgz#b3a8d8bb6f92eecc1629e3e27d3c8607a8a32414" + integrity sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ== dependencies: is-arrayish "^0.2.1" @@ -2449,16 +2460,15 @@ ms@^2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== msw@^2.8.4: - version "2.11.1" - resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.1.tgz#77f7c5c60ffd08e4bc351cca4608418db15e5ac2" - integrity sha512-dGSRx0AJmQVQfpGXTsAAq4JFdwdhOBdJ6sJS/jnN0ac3s0NZB6daacHF1z5Pefx+IejmvuiLWw260RlyQOf3sQ== + version "2.11.3" + resolved "https://registry.yarnpkg.com/msw/-/msw-2.11.3.tgz#5a51a7eebd334957fefb375b9d985e3893071ad3" + integrity sha512-878imp8jxIpfzuzxYfX0qqTq1IFQz/1/RBHs/PyirSjzi+xKM/RRfIpIqHSCWjH0GxidrjhgiiXC+DWXNDvT9w== dependencies: "@bundled-es-modules/cookie" "^2.0.1" "@bundled-es-modules/statuses" "^1.0.1" "@inquirer/confirm" "^5.0.0" "@mswjs/interceptors" "^0.39.1" "@open-draft/deferred-promise" "^2.2.0" - "@open-draft/until" "^2.1.0" "@types/cookie" "^0.6.0" "@types/statuses" "^2.0.4" graphql "^16.8.1" @@ -2467,9 +2477,11 @@ msw@^2.8.4: outvariant "^1.4.3" path-to-regexp "^6.3.0" picocolors "^1.1.1" + rettime "^0.7.0" strict-event-emitter "^0.5.1" tough-cookie "^6.0.0" type-fest "^4.26.1" + until-async "^3.0.2" yargs "^17.7.2" mute-stream@^2.0.0: @@ -2499,10 +2511,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.19: - version "2.0.19" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" - integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== +node-releases@^2.0.21: + version "2.0.21" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.21.tgz#f59b018bc0048044be2d4c4c04e4c8b18160894c" + integrity sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw== normalize-path@^3.0.0: version "3.0.0" @@ -2517,9 +2529,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.21" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.21.tgz#8df7797079350adda208910d8c33fc4c2d7520c3" - integrity sha512-o6nIY3qwiSXl7/LuOU0Dmuctd34Yay0yeuZRLFmDPrrdHpXKFndPj3hM+YEPVHYC5fx2otBx4Ilc/gyYSAUaIA== + version "2.2.22" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.22.tgz#109f9530cda6c156d6a713cdf5939e9f0de98b9d" + integrity sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ== once@^1.3.0: version "1.4.0" @@ -2743,6 +2755,11 @@ resolve@^1.20.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +rettime@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/rettime/-/rettime-0.7.0.tgz#c040f1a65e396eaa4b8346dd96ed937edc79d96f" + integrity sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw== + safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -2972,17 +2989,17 @@ 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-core@^7.0.16: + version "7.0.16" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.16.tgz#f94a42b1f571ee7e4d5c58a4a3486d557b093c14" + integrity sha512-XHhPmHxphLi+LGbH0G/O7dmUH9V65OY20R7vH8gETHsp5AZCjBk9l8sqmRKLaGOxnETU7XNSDUPtewAy/K6jbA== tldts@^7.0.5: - version "7.0.12" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.12.tgz#e11008e9a3f27448e7aecb8d0fa51f929ec9549d" - integrity sha512-M9ZQBPp6FyqhMcl233vHYyYRkxXOA1SKGlnq13S0mJdUhRSwr2w6I8rlchPL73wBwRlyIZpFvpu2VcdSMWLYXw== + version "7.0.16" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.16.tgz#8eecb4c15608a23e5b360d64d74f937fb9dbe6aa" + integrity sha512-5bdPHSwbKTeHmXrgecID4Ljff8rQjv7g8zKQPkCozRo2HWWni+p310FSn5ImI+9kWw9kK4lzOB5q/a6iv0IJsw== dependencies: - tldts-core "^7.0.12" + tldts-core "^7.0.16" tmpl@1.0.5: version "1.0.5" @@ -3026,9 +3043,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-jest@^29.3.4: - version "29.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.1.tgz#42d33beb74657751d315efb9a871fe99e3b9b519" - integrity sha512-SaeUtjfpg9Uqu8IbeDKtdaS0g8lS6FT6OzM3ezrDfErPJPHNDo/Ey+VFGP1bQIDfagYDLyRpd7O15XpG1Es2Uw== + version "29.4.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.4.4.tgz#fc6fefe28652ed81b8e1381ef8391901d9f81417" + integrity sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw== dependencies: bs-logger "^0.2.6" fast-json-stable-stringify "^2.1.0" @@ -3081,16 +3098,21 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~7.10.0: - version "7.10.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" - integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== +undici-types@~7.12.0: + version "7.12.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.12.0.tgz#15c5c7475c2a3ba30659529f5cdb4674b622fafb" + integrity sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ== universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +until-async@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/until-async/-/until-async-3.0.2.tgz#447f1531fdd7bb2b4c7a98869bdb1a4c2a23865f" + integrity sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw== + update-browserslist-db@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"