Airdrop snap-in starter template is available here.

The template makes use of DevRev’s SDK library, which helps developers build snap-ins that integrate with DevRev’s Airdrop platform. This library simplifies the workflow for handling data extraction and loading, event-driven actions, state management, and artifact handling.

It provides features such as:

  • Event management: Communication between Airdrop platform and Airdrop snap-in involves messages called events - depending on the type of event, the snap-in performs different actions.
  • State handling: Update and access state in real-time within tasks.
  • Artifact management: Supports batched storage of artifacts.
  • Error & timeout support: Error handling and timeout management for long-running tasks.
  • Type definitions: Structured types for Airdrop control protocol.

Snap-in code structure

If you check the template, you can see that a snap-in is a Node.js project with a specific file structure:

1- manifest.yaml
2- code/
3 - scripts/
4 - src/
5 - fixtures/
6 - functions/
7 - external-system/
8 - extraction/
9 - workers/
10 - attachments-extraction.ts
11 - data-extraction.ts
12 - external-sync-units-extraction.ts
13 - metadata-extraction.ts
14 - index.ts
15 - install_initial_domain_mapping/
16 - loading/
17 - workers/
18 - load-attachments.ts
19 - load-data.ts
20 - index.ts
21 - test-runner/
22 - test/

The manifest.yaml is a configuration file that defines details such as the snap-in’s name, description, version, connection information, and functionality specifics. Adjusting this file is the initial step in the development of a snap-in.

The code/ folder holds the implementation of the snap-in. Inside, the functions/ subfolder includes the logic for retrieving external sync units, extracting data from and loading data to external systems, and mapping between them.

Built with