### Generate Example Data with chef-cli Source: https://developer.devrev.ai/airsync/data-extraction This command uses 'chef-cli fuzz-extracted' to generate example data for 'issue' type, based on the 'external_domain_metadata.json' file. The output is redirected to 'example_issues.json' to show the required data format for normalization. ```shell echo '{}' | chef-cli fuzz-extracted -r issue -m external_domain_metadata.json > example_issues.json ``` -------------------------------- ### MCP Configuration File (mcp.json) Source: https://developer.devrev.ai/airsync/mcp Example JSON configuration file for setting up MCP servers in Chef-cli. This file defines the command and arguments to be used for the MCP integration, specifically for initial mapping. ```json { "mcpServers": { "AirSync": { "command": "chef-cli", "args": [ "mcp", "initial-mapping" ] } } } ``` -------------------------------- ### Implement Metadata Extraction with TypeScript Source: https://developer.devrev.ai/airsync/metadata-extraction This code snippet demonstrates how to implement the metadata extraction process within a TypeScript snap-in for AirSync. It uses the '@devrev/ts-adaas' library to process tasks, initialize repositories, push external domain metadata, and emit completion or error events. Ensure the '@devrev/ts-adaas' package is installed as a dependency. ```typescript import { ExtractorEventType, processTask } from "@devrev/ts-adaas"; import externalDomainMetadata from "../../external-system/external_domain_metadata.json"; const repos = [{ itemType: "external_domain_metadata" }]; processTask({ task: async ({ adapter }) => { adapter.initializeRepos(repos); await adapter .getRepo("external_domain_metadata") ?.push([externalDomainMetadata]); await adapter.emit(ExtractorEventType.ExtractionMetadataDone); }, onTimeout: async ({ adapter }) => { await adapter.emit(ExtractorEventType.ExtractionMetadataError, { error: { message: "Failed to extract metadata. Lambda timeout." }, }); }, }); ``` -------------------------------- ### Configure State Transitions with Stage Diagram Metadata Source: https://developer.devrev.ai/airsync/metadata-extraction This JSON metadata defines a 'stage_diagram' for a status field, specifying allowed transitions between states. It includes field definitions, controlling field, starting stage, and explicit transitions for each stage. This ensures DevRev accurately reflects external system states and transitions, improving data synchronization. ```json { "fields": { "status": { "name": "Status", "is_required": true, "type": "enum", "enum": { "values": [ { "key": "detected", "name": "Detected" }, { "key": "mitigated", "name": "Mitigated" }, { "key": "rca_ready", "name": "RCA Ready" }, { "key": "archived", "name": "Archived" } ] } } }, "stage_diagram": { "controlling_field": "status", "starting_stage": "detected", "all_transitions_allowed": false, "stages": { "detected": { "transitions_to": ["mitigated", "archived", "rca_ready"], "state": "new" }, "mitigated": { "transitions_to": ["archived", "detected"], "state": "work_in_progress" }, "rca_ready": { "transitions_to": ["archived"], "state": "work_in_progress" }, "archived": { "transitions_to": [], "state": "completed" } }, "states": { "new": { "name": "New" }, "work_in_progress": { "name": "Work in Progress" }, "completed": { "name": "Completed", "is_end_state": true } } } } ``` -------------------------------- ### Claude Code MCP Setup Command Source: https://developer.devrev.ai/airsync/mcp Command to set up AirSync within Claude Code using MCP. This command registers the necessary components for MCP integration. ```bash claude mcp add airsync chef-cli mcp initial-mapping ``` -------------------------------- ### AirSync Snap-in Extraction Lifecycle Management (TypeScript) Source: https://developer.devrev.ai/airsync/extraction-phases Manages the extraction lifecycle for AirSync snap-ins by routing events to the appropriate worker based on the extraction phase. It utilizes the `spawn` function from `@devrev/ts-adaas` to execute worker tasks. ```typescript import { AirdropEvent, EventType, spawn } from "@devrev/ts-adaas"; export interface ExtractorState { todos: { completed: boolean }; users: { completed: boolean }; attachments: { completed: boolean }; } export const initialState: ExtractorState = { todos: { completed: false }, users: { completed: false }, attachments: { completed: false }, }; function getWorkerPerExtractionPhase(event: AirdropEvent) { let path; switch (event.payload.event_type) { case EventType.ExtractionExternalSyncUnitsStart: path = __dirname + "/workers/external-sync-units-extraction"; break; case EventType.ExtractionMetadataStart: path = __dirname + "/workers/metadata-extraction"; break; case EventType.ExtractionDataStart: case EventType.ExtractionDataContinue: path = __dirname + "/workers/data-extraction"; break; case EventType.ExtractionAttachmentsStart: case EventType.ExtractionAttachmentsContinue: path = __dirname + "/workers/attachments-extraction"; break; } return path; } const run = async (events: AirdropEvent[]) => { for (const event of events) { const file = getWorkerPerExtractionPhase(event); await spawn({ event, initialState, workerPath: file, initialDomainMapping: { /* your initial domain mapping JSON here */ }, // options: {}, }); } }; export default run; ``` -------------------------------- ### DevRev Simple Rich Text Example Source: https://developer.devrev.ai/airsync/data-model/rich-text-fields Demonstrates a basic rich text field in DevRev, represented as a Markdown string within an array. Markdown must adhere to the CommonMark Spec v0.30. ```json ["Hello **world**!"] ``` -------------------------------- ### Implement Data Loading with AirSync TypeScript Source: https://developer.devrev.ai/airsync/load-data This code snippet demonstrates how to implement the data loading phase in AirSync using TypeScript. It shows the structure for defining item types to load, including 'create' and 'update' functions, and how to emit 'DataLoadingDone' or 'DataLoadingProgress' events. ```typescript processTask({ task: async ({ adapter }) => { const { reports, processed_files } = await adapter.loadItemTypes({ itemTypesToLoad: [ { itemType: 'todos', create: createTodo, update: updateTodo, }, ], }); await adapter.emit(LoaderEventType.DataLoadingDone, { reports, processed_files, }); }, onTimeout: async ({ adapter }) => { await adapter.emit(LoaderEventType.DataLoadingProgress, { reports: adapter.reports, processed_files: adapter.processedFiles, }); }, }); ``` -------------------------------- ### HTML Article Mention Example Source: https://developer.devrev.ai/airsync/data-model/rich-text-fields This HTML snippet demonstrates how to create a link to another article within DevRev. The `data-article-id` attribute is used for internal platform resolution, while the `href` attribute specifies the URL. ```html Contact our Support Team ``` -------------------------------- ### Create New Sync Mapper Record (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers The `create` method is used to establish a new sync mapper record between external and DevRev entities. It should be called when persisting a new link, ensuring lookups are possible in both directions and preventing duplicates. ```typescript import { SyncMapperRecordStatus } from "@devrev/ts-adaas"; const response = await adapter.mappers.create({ sync_unit: adapter.event.payload.event_context.sync_unit, external_ids: [externalSystemId], targets: [devrevEntityId], status: SyncMapperRecordStatus.OPERATIONAL, }); ``` -------------------------------- ### TypeScript: Implement Attachment Loading with AirSync Source: https://developer.devrev.ai/airsync/load-attachments This TypeScript code snippet demonstrates the implementation of the attachment loading phase in an AirSync snap-in. It utilizes the `processTask` function to handle the asynchronous loading of attachments, including API calls for creation, error handling, and emitting completion or progress events. ```typescript processTask({ task: async ({ adapter }) => { const { reports, processed_files } = await adapter.loadAttachments({ create: createAttachment, }); await adapter.emit(LoaderEventType.AttachmentLoadingDone, { reports, processed_files, }); }, onTimeout: async ({ adapter }) => { await adapter.emit(LoaderEventType.AttachmentLoadingProgress, { reports: adapter.reports, processed_files: adapter.processedFiles, }); }, }); ``` -------------------------------- ### AI Assistant Instructions for AirSync Initial Mapping Source: https://developer.devrev.ai/airsync/mcp Guidelines for AI assistants when performing AirSync initial mapping. These instructions detail the use of metadata and mapping files, and available MCP tools. ```text When performing AirSync initial mapping: - Use `metadata.json` for external domain metadata. - Use `mappings.json` as the initial domain mapping file. - Call `use_mapping` to test how the initial mapping behaves on the current metadata. - Use MCP tools for: - Adding and removing record type mappings - Unmapping fields - Mapping simple fields - For complex field mappings, edit the mapping file directly: - Refer to `initial_mappings_schema.yaml` for proper format. - Always call `use_mapping` to verify the mapping file remains valid. ``` -------------------------------- ### Declare Custom Record Types in AirSync Metadata Source: https://developer.devrev.ai/airsync/metadata-extraction This example demonstrates how to declare custom or variant record types in AirSync's metadata. These are discovered dynamically via external system APIs. The declared types, such as 'issues_stock_epic', 'issues_custom2321', and 'issues_custom2322', must correspond to the `item_type` field in uploaded artifacts. ```json { "record_types": { "issues_stock_epic": {}, "issues_custom2321": {}, "issues_custom2322": {}, "comments": {} } } ``` -------------------------------- ### Mark Record Types as Loadable for Two-Way Sync in AirSync Source: https://developer.devrev.ai/airsync/metadata-extraction This snippet demonstrates how to mark specific record types as loadable in AirSync metadata using the `is_loadable` flag. This is essential for enabling two-way synchronization, allowing AirSync to load data into the external system. Both 'issues_stock_epic' and 'comments' are marked as loadable in this example. ```json { "record_types":{ "issues_stock_epic":{ "name":"Epic", "category":"issue", "is_loadable": true }, "issues_custom2321":{ "name":"Incident report", "category":"issue" }, "issues_custom2322":{ "name":"Problem", "category":"issue" }, "comments":{ "name":"Comment", "is_loadable": true } } } ``` -------------------------------- ### Linkable Resource API Source: https://developer.devrev.ai/airsync/supported-object-types Documentation for the 'linkable' resource, representing parts that can be linked or referenced. ```APIDOC ## Linkable Resource API ### Description This resource represents a 'linkable' part, which can be a component or library, with associated metadata. ### Resource Type `part`, `linkable` ### Capabilities Can Extract, Can Load, Can Subtype ### Fixed Fields - **part_type** (text) - Value: "linkable" ### Fields - **coderepo_paths** (text) - Paths in the repository for the code part. - **coderepo_url** (text) - URL to the server & repo for the code part. - **created_by_id** (reference → [#category:user]) - User ID of the user that created the object. - **delivered_as** (enum (collection)) - Methods the product can be delivered as. - **description** (rich_text) - Description of the part. - **discoveryevidences** (text (collection)) - Evidences that justify the inference outcome. - **docs** (struct (collection)) - Docs associated with the part. - **item_url_field** (text) - Link to the item in the origin system. - **kind** (enum) - The kind of linkable. - **modified_by_id** (reference → [#category:user]) - User ID of the user that last modified the object. - **name** (text) - Required - Name of the part. - **owned_by_ids** (reference (collection) → [#record:devu]) - Required - User IDs of the users that own the part. - **parent_part** (reference → [#category:part]) - Parent of this part. - **ref_url** (text) - URL to the part details (git url, website, etc.). - **tags** (reference (collection) → [#record:tag]) - Tags associated with the object. #### Enum values for `delivered_as`: - `goods` (goods) - `service` (service) - `software` (software) #### Enum values for `kind`: - `component` (component) - `library` (library) ``` -------------------------------- ### Initializing Repositories for Data Extraction Source: https://developer.devrev.ai/airsync/data-extraction Define and initialize repositories for different item types (e.g., todos, users) before processing extracted data. The `itemType` should align with the `record_type` in the metadata. ```typescript const repos = [ { itemType: "todos", }, { itemType: "users", }, { itemType: "attachments", }, ]; processTask({ task: async ({ adapter }) => { adapter.initializeRepos(repos); // ... }, onTimeout: async ({ adapter }) => { // ... }, }); ``` -------------------------------- ### Adding AirSync Documentation to MCP Server Source: https://developer.devrev.ai/airsync/mcp Command to add DevRev's AirSync documentation to your MCP server. This is typically done by providing a custom docs URL. ```bash Add DevRev's AirSync documentation to your MCP server by including https://developer.devrev.ai/public/airsync/ as a custom docs URL. ``` -------------------------------- ### Custom Attachment Processing Example (TypeScript) Source: https://developer.devrev.ai/airsync/customize-attachment-processing An example demonstrating custom reducer and iterator functions for refreshing expired attachment URLs. The reducer groups attachments by parent, and the iterator fetches fresh URLs and processes them using the adapter. ```typescript // Example: Custom processors for refreshing expired URLs import { processTask, ExtractorEventType } from '@devrev/ts-adaas'; // Custom reducer function - transforms the input attachments array const reducer = ({ attachments, adapter }) => { // Group attachments by their parent_id (ticket/task/etc.) to minimize API calls // Instead of fetching each attachment individually, fetch the parent once // to get all its attachments with fresh URLs return attachments.reduce((parentMap, attachment) => { const parentId = attachment.parent_id; // Create a new array for this parent if it doesn't exist yet if (!parentMap.has(parentId)) { parentMap.set(parentId, []); } // Add this attachment to the parent's group parentMap.get(parentId)!.push(attachment); return parentMap; }, new Map()); }; // Custom iterator function - processes the reduced data const iterator = async ({ reducedAttachments, adapter, stream }) => { // reducedAttachments is now a Map where: // - key: parent_id (e.g., ticket ID, issue ID) // - value: array of attachments belonging to that parent for (const [parentId, attachments] of reducedAttachments) { // Fetch the parent item to get fresh attachment URLs // Implement your custom logic here (API call, URL refresh, token renewal, etc.) const freshAttachments = await refetchParentAttachments(parentId); // Process each attachment in this parent group for (const attachment of attachments) { // Find the corresponding fresh attachment data const freshAttachment = freshAttachments.find(fresh => fresh.id === attachment.id); // Update the attachment with fresh data (URL, filename, etc.) const updatedAttachment = freshAttachment ? { ...attachment, url: freshAttachment.url, file_name: freshAttachment.file_name } : attachment; // fallback to original if not found // Use the SDK's built-in attachment processing const result = await adapter.processAttachment(updatedAttachment, stream); // Handle rate limiting - return immediately to trigger retry if (result?.delay) return { delay: result.delay }; // Log errors but continue processing other attachments if (result?.error) { console.warn(`Failed to process attachment ${attachment.id}:`, result.error); } } } // Return undefined to signal successful completion return; }; // Example usage within a processTask worker processTask({ task: async ({ adapter }) => { try { const response = await adapter.streamAttachments({ stream: getAttachmentStream, // Function that fetches attachment content processors: { reducer, // Transform attachments into groups iterator // Process groups with custom logic } }); // ... }, // ... }); ``` -------------------------------- ### Configure Keyring Type in manifest.yaml Source: https://developer.devrev.ai/airsync/manifest This YAML snippet demonstrates the structure for configuring a keyring type within a `manifest.yaml` file. It includes essential fields like `id`, `name`, `kind`, and `is_subdomain`, along with configurations for `secret_config` or `organization_data` depending on the `kind` and `is_subdomain` settings. ```yaml keyring_types: - id: name: description: # The kind field specifies the type of keyring. kind: <"secret"/"oauth2"> # is_subdomain field specifies whether the keyring contains a subdomain. # Enabling this field allows the keyring to get the subdomain from the user during keyring creation. # Default is false. is_subdomain: # Name of the external system you are importing from. # This system name should start with a capital letter. external_system_name: secret_config: # Define the fields in the secret. # Each element represents one input field. # User will provide this information when creating the connection in the UI. # If omitted, the user will be asked for a generic secret. fields: - id: name: description: is_optional: # optional: whether the field is optional or not. Default is false. # The token_verification section is used to verify the token provided by the user. token_verification: # The URL to which the token will be sent for verification. url: # The HTTP method to be used for the verification request. method: # The HTTP method to be used for the verification request. # Optional: headers to be included in the verification request. headers: : # Optional: query parameters to be included in the verification request. query_params: : # optional: query parameters to be included in the verification request. # The organization_data section takes care of fetching organization data and is required if is_subdomain option is false. organization_data: type: "config" # The URL to which the request is sent to fetch organization data. url: # The HTTP method used to send the request. method: "GET" headers: : # The jq filter used to extract the organization data from the response. # It should provide an object with id and name, depending on what the external system returns. # For example "{id: .data[0].id, name: .data[0].name }". response_jq: ``` -------------------------------- ### Link Resource API Source: https://developer.devrev.ai/airsync/supported-object-types Documentation for the 'link' resource, which defines relationships between different work items. ```APIDOC ## Link Resource API ### Description This resource represents a link between two work items, defining the type of relationship between them. ### Resource Type `link` ### Capabilities Can Extract, Can Load ### Fields - **created_by_id** (reference → [#category:user]) - User ID of the user that created the object. - **link_type** (enum) - Required - Type of link used to define the relationship. - **source_id** (reference → [#category:work #record:incident]) - Required - Source object ID. - **source_object_type** (enum) - Source object type. - **target_id** (reference → [#category:work #record:incident]) - Required - Target object ID. - **target_object_type** (enum) - Target object type. - **transformed_from_id** (text) - #### Enum values for `link_type`: - `is_dependent_on` (Is Dependent On) - `is_duplicate_of` (Is Duplicate Of) - `is_parent_of` (Is Parent Of) - `is_related_to` (Is Related To) #### Enum values for `source_object_type`: - `conversation` - `incident` - `work` #### Enum values for `target_object_type`: - `conversation` - `incident` - `work` ``` -------------------------------- ### Manage DevRev Airsync Loading Phases with TypeScript Source: https://developer.devrev.ai/airsync/loading-phases This TypeScript code manages the loading phases for DevRev Airsync, determining the correct worker file based on the event type (data or attachments) and spawning a worker instance. It requires the `@devrev/ts-adaas` package and uses `spawn` to initiate the loading process with initial state and domain mapping. ```typescript import { AirdropEvent, EventType, spawn } from '@devrev/ts-adaas'; export interface LoaderState {} export const initialLoaderState: LoaderState = {}; function getWorkerPerLoadingPhase(event: AirdropEvent) { let path; switch (event.payload.event_type) { case EventType.StartLoadingData: case EventType.ContinueLoadingData: path = __dirname + '/workers/load-data'; break; case EventType.StartLoadingAttachments: case EventType.ContinueLoadingAttachments: path = __dirname + '/workers/load-attachments'; break; } return path; } const run = async (events: AirdropEvent[]) => { for (const event of events) { const file = getWorkerPerLoadingPhase(event); await spawn({ event, initialState: initialLoaderState, workerPath: file, initialDomainMapping: { /* your initial domain mapping JSON here */ }, // options: {}, }); } }; export default run; ``` -------------------------------- ### Retrieve DevRev Entity by External ID (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers This method, `adapter.mappers.getByExternalId`, finds the corresponding DevRev entity when you provide an ID from the external system. It requires the sync unit, external ID, and target type. ```typescript import { SyncMapperRecordTargetType } from "@devrev/ts-adaas"; const response = await adapter.mappers.getByExternalId({ sync_unit: adapter.event.payload.event_context.sync_unit, external_id: externalSystemId, target_type: SyncMapperRecordTargetType.WORK, }); const devrevTargets = response.data.sync_mapper_record.targets; ``` -------------------------------- ### Pushing Extracted Items to Repositories Source: https://developer.devrev.ai/airsync/data-extraction After initializing repositories, retrieve items from the external system and push them into the appropriate repository using the `push` function. The SDK handles batching and uploading. ```typescript await adapter.getRepo("users")?.push(items); ``` -------------------------------- ### Update Existing Sync Mapper Record (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers Use the `update` method to modify an existing sync mapper record. This allows adding new external IDs or DevRev entity IDs to the record. ```typescript import { SyncMapperRecordStatus } from "@devrev/ts-adaas"; const response = await adapter.mappers.update({ id: syncMapperRecordId, sync_unit: adapter.event.payload.event_context.sync_unit, external_ids: { add: [newExternalId], }, targets: { add: [newDevrevEntityId], }, status: SyncMapperRecordStatus.OPERATIONAL, }); ``` -------------------------------- ### Component API Source: https://developer.devrev.ai/airsync/supported-object-types Endpoints for managing components, which are a subtype of parts. Components can be extracted, loaded, and subtyped. ```APIDOC ## component **Resource Type:** `part`, `component` **Capabilities:** Can Extract, Can Load, Can Subtype ### Fixed fields Field| Value ---|--- `part_type`| "component" ### Fields Field| Type| Required| Description ---|---|---|--- `created_by_id`| reference → [#category:user]| | User ID of the user that created the object `delivered_as`| enum (collection)| | Methods the product can be delivered as `description`| rich_text| | Description of the part `development_owner_id`| reference → [#record:devu]| | User ID of the development owner of the part `docs`| struct (collection)| | Docs associated with the part `item_url_field`| text| | Link to the item in the origin system `modified_by_id`| reference → [#category:user]| | User ID of the user that last modified the object `name`| text| ✔︎| Name of the part `owned_by_ids`| reference (collection) → [#record:devu]| ✔︎| User IDs of the users that own the part `parent_part`| reference → [#category:part]| | Parent of this part `pm_owner_id`| reference → [#record:devu]| | User ID of the PM owner of the part `qa_owner_id`| reference → [#record:devu]| | User ID of the QA owner of the part `ref_url`| text| | URL to the part details (git url, website, etc.) `tags`| reference (collection) → [#record:tag]| | Tags associated with the object #### Enum values **delivered_as** Value| Name| Description ---|---|--- `goods`| goods| - `service`| service| - `software`| software| - ``` -------------------------------- ### Declare Array Fields - JSON Source: https://developer.devrev.ai/airsync/metadata-extraction This JSON snippet demonstrates how to declare an array field in AirSync. The field is of type 'reference' and refers to the '#category:agents'. The 'collection' property specifies that it's a list with a maximum length of 5. ```json { "name": "Assignees", "is_required": true, "type": "reference", "reference": { "refers_to": { "#category:agents": {} } }, "collection": { "max_length": 5 } } ``` -------------------------------- ### DevRev HTML Article Content Transformation Source: https://developer.devrev.ai/airsync/data-model/rich-text-fields Provides an example of transforming external HTML article content with attachments into DevRev's rich text format. This involves replacing external image URLs with DevRev artifact mentions. ```json [ "

This is an article with one image.

" }, "\" alt=\"download.jpeg\">

" ] ``` -------------------------------- ### Retrieve External ID by DevRev ID (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers Use `adapter.mappers.getByTargetId` to find the corresponding external system ID when you have a DevRev entity ID. The function returns data containing the sync mapper record with external IDs. ```typescript const response = await adapter.mappers.getByTargetId({ sync_unit: adapter.event.payload.event_context.sync_unit, target: devrevEntityId, }); const externalIds = response.data.sync_mapper_record.external_ids; ``` -------------------------------- ### Find Parent Work Item for Comment (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers This code shows how to find the parent DevRev work item for an external comment using `adapter.mappers.getByExternalId`. It requires the sync unit and the external comment's ticket ID. ```typescript import { SyncMapperRecordTargetType } from "@devrev/ts-adaas"; // Find parent work item for comment const parentSyncMapperRecord = await adapter.mappers.getByExternalId({ sync_unit: adapter.event.payload.event_context.sync_unit, external_id: externalComment.ticket_id, target_type: SyncMapperRecordTargetType.WORK, }); ``` -------------------------------- ### Meeting Resource API Source: https://developer.devrev.ai/airsync/supported-object-types Documentation for the 'meeting' resource, representing scheduled or completed meetings. ```APIDOC ## Meeting Resource API ### Description This resource represents a meeting, including its scheduling, participants, and associated metadata. ### Resource Type `meeting` ### Capabilities Can Load ### Fields - **channel** (enum) - Required - The channel of meeting. - **created_by_id** (reference → [#category:user]) - User ID of the user that created the object. - **description** (rich_text) - Description of the meeting. - **ended_date** (timestamp) - Time at which meeting ended. - **engagement_new_ref** (text) - Reference ID associated with the new engagement. - **external_ref_id** (text) - External reference of the meeting. This is the identifier from the meeting channel/provider. - **external_url** (text) - External URL associated with the meeting. - **item_url_field** (text) - Link to the item in the origin system. - **member_ids** (reference (collection) → [#category:user]) - Required - IDs of the members in the meeting. - **organizer_id** (reference → [#category:user]) - Required - ID of the organizer of the meeting. - **parent_id** (reference → [#category:work #record:account]) - Parent ID of the meeting. - **parent_object_type** (enum) - Parent Objet Type. - **recording_url** (text) - Recording URL of the meeting. - **scheduled_date** (timestamp) - Time at which meeting was scheduled to start. - **state** (enum) - Required - The state of meeting. - **tags** (reference (collection) → [#record:tag]) - Tags associated with the meeting. - **title** (text) - Title of the meeting object. - **visibility** (enum) - The visibility of the object. If 'internal', the object is visible within the Dev organization. If 'external', it is visible to both the Dev organization and Rev users. If 'private', only the users with whom the object is shared with will have the access. If not set, the default visibility is 'external'. ``` -------------------------------- ### JSON Data with Item URL Field Source: https://developer.devrev.ai/airsync/data-extraction This JSON example shows a normalized data structure for work items, including the 'item_url_field' within the 'data' attribute. This URL points to the item in the external system, facilitating easy access from the DevRev app. ```json { "id": "2102e01F", "created_date": "1972-03-29T22:04:47+01:00", "modified_date": "1970-01-01T01:00:04+01:00", "data": { "actual_close_date": "1970-01-01T02:33:18+01:00", "creator": "b8", "owner": "A3A", "rca": null, "severity": "fatal", "summary": "Lorem ipsum", "item_url_field": "https://external-system.com/issue/123" } } ``` -------------------------------- ### Article Resource Source: https://developer.devrev.ai/airsync/supported-object-types Details of the 'article' resource type, including its fields, enum values, and struct definitions. ```APIDOC ## Article Resource ### Fields Field| Type| Required| Description ---|---|---|--- `access_level`| enum| | Default access level for the object. `aliases`| text (collection)| | Aliases for the URL of the article. `applies_to_part_ids`| reference (collection) → [#category:part]| | Parts relevant to the article. `authored_by_ids`| reference (collection) → [#category:user]| | Users that authored the article. `created_by_id`| reference → [#category:user]| | User ID of the user that created the object `description`| rich_text| | Description of the article. `extracted_plain_text`| text| | Extracted Plain Text `item_url_field`| text| | Link to the item in the origin system `language`| text| | Language of the article for i18n support. `modified_by_id`| reference → [#category:user]| | User ID of the user that last modified the object `num_downvotes`| int| | Number of downvotes on the article. `num_upvotes`| int| | Number of upvotes on the article. `owned_by_ids`| reference (collection) → [#category:user]| ✔︎| Users that own the article. `parent`| reference → [#record:directory]| | Parent of the article. `primary_article_id`| reference → [#record:article]| | Primary article ID `published_date`| timestamp| | Timestamp when the article was published. `rank`| text| | Rank of the article. `resource`| struct| | The user visible resource of the article. It can either be rich text visible in DevRev or a URL to an article hosted outside of DevRev. `scope`| enum| | Scope of the article. `shared_with`| permission (collection)| | The list of Rev user, groups and dynamic groups with whom the article is shared and the corresponding roles. `status`| enum| | Status of the article. `tags`| reference (collection) → [#record:tag]| | Tags associated with the article. `title`| text| ✔︎| Title of the article. `type`| enum| | Type of the article. `visible_to`| enum| | #### Enum values **access_level** Value| Name| Description ---|---|--- `EXTERNAL`| -| - `INTERNAL`| -| - `PRIVATE`| -| - `PUBLIC`| -| - `RESTRICTED`| -| - **scope** Value| Name| Description ---|---|--- `1`| internal| - `2`| external| - **status** Value| Name| Description ---|---|--- `archived`| archived| - `draft`| draft| - `published`| published| - `review_needed`| review_needed| - **type** Value| Name| Description ---|---|--- `article`| article| - `content_block`| content_block| - **visible_to** Value| Name| Description ---|---|--- `customer_admins`| -| - `customers`| -| - `verified_customers`| -| - ### Structs #### resource Field| Type| Required| Description ---|---|---|--- `content`| rich_text| | Rich text content of the resource (relevant only for type devrev/rt). `type`| enum| | The type of resource. `url`| text| | URL of the resource (relevant only for type url). ``` -------------------------------- ### Find External ID for DevRev Entity (TypeScript) Source: https://developer.devrev.ai/airsync/object-mappers This snippet illustrates how to retrieve the external system ID for a given DevRev entity ID using `adapter.mappers.getByTargetId`. This is useful during loading operations when pushing data back to external systems. ```typescript // Find external ID to update external system const syncMapperRecord = await adapter.mappers.getByTargetId({ sync_unit: adapter.event.payload.event_context.sync_unit, target: devrevWorkId, }); ``` -------------------------------- ### Capability Resource Source: https://developer.devrev.ai/airsync/supported-object-types Details of the 'capability' resource type, including its fixed fields, general fields, and enum values for delivery methods. ```APIDOC ## Capability Resource **Resource Type:** `part`, `capability` **Capabilities:** Can Extract, Can Load, Can Subtype ### Fixed fields Field| Value ---|--- `part_type`| "capability" ### Fields Field| Type| Required| Description ---|---|---|--- `created_by_id`| reference → [#category:user]| | User ID of the user that created the object `delivered_as`| enum (collection)| | Methods the product can be delivered as `description`| rich_text| | Description of the part `docs`| struct (collection)| | Docs associated with the part `fulfilled_by`| reference (collection) → [#category:part]| | IDs of the runnables that fulfill this capability `item_url_field`| text| | Link to the item in the origin system `modified_by_id`| reference → [#category:user]| | User ID of the user that last modified the object `name`| text| ✔︎| Name of the part `owned_by_ids`| reference (collection) → [#record:devu]| ✔︎| User IDs of the users that own the part `parent_part`| reference → [#category:part]| ✔︎| Parent of this part `pm_owner_id`| reference → [#record:devu]| | User ID of the PM owner of the part `ref_url`| text| | URL to the part details (git url, website, etc.) `tags`| reference (collection) → [#record:tag]| | Tags associated with the object #### Enum values **delivered_as** Value| Name| Description ---|---|--- `goods`| goods| - `service`| service| - `software`| software| - ```