Skip to content

Commit

Permalink
feat: Merge plugin updates (#258)
Browse files Browse the repository at this point in the history
* feat: add strict typing

* feat: bulk delete records

* feat: refactor to use openapi plugin and improve readability

* feat: dynamically retrieve category

* Update package-lock.json

* chore: update comments

* feat: camelcase field keys

* chore: add comment

* chore: update package.json

* chore: update deps

* chore: update version

* Update package-lock.json

* chore: update package.json

* Create nine-rats-relate.md
  • Loading branch information
carlbrugger authored Mar 11, 2024
1 parent db530df commit 9535565
Show file tree
Hide file tree
Showing 13 changed files with 614 additions and 566 deletions.
5 changes: 5 additions & 0 deletions .changeset/nine-rats-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@flatfile/plugin-connect-via-merge': minor
---

This release provides support for additional Merge.dev integrations.
41 changes: 19 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions plugins/merge-connection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
"dependencies": {
"@flatfile/api": "^1.7.4",
"@flatfile/listener": "^1.0.1",
"@flatfile/plugin-convert-openapi-schema": "^0.1.2",
"@flatfile/plugin-job-handler": "^0.3.3",
"@flatfile/util-common": "^1.0.0",
"@mergeapi/merge-node-client": "^0.1.6",
"axios": "^1.6.5"
"@mergeapi/merge-node-client": "^1.0.4"
}
}
102 changes: 102 additions & 0 deletions plugins/merge-connection/src/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
export const MERGE_ACCESS_KEY = 'MERGE_ACCESS_KEY'
export const MAX_SYNC_ATTEMPTS = 30 // Thirty cycles is equates to approx. 5 minutes
export const SYNC_RETRY_INTERVAL_MS = 10_000 // 10 seconds
export const CATEGORY_MODELS = {
accounting: {
Account: 'accounts',
Address: 'addresses',
Attachment: 'attachments',
BalanceSheet: 'balanceSheets',
CashFlowStatement: 'cashFlowStatements',
CompanyInfo: 'companyInfo',
CreditNote: 'creditNotes',
Expense: 'expenses',
IncomeStatement: 'incomeStatements',
Invoice: 'invoices',
Item: 'items',
JournalEntry: 'journalEntries',
Payment: 'payments',
PhoneNumber: 'phoneNumbers',
PurchaseOrder: 'purchaseOrders',
TaxRate: 'taxRates',
TrackingCategory: 'trackingCategories',
Transaction: 'transactions',
VendorCredit: 'vendorCredits',
},
ats: {
Activity: 'activities',
Application: 'applications',
Attachment: 'attachments',
Candidate: 'candidates',
Department: 'departments',
EEOC: 'eeocs',
ScheduledInterview: 'interviews',
JobInterviewStage: 'jobInterviewStages',
Job: 'jobs',
Offer: 'offers',
Office: 'offices',
RejectReason: 'rejectReasons',
Scorecard: 'scorecards',
ScreeningQuestion: 'screeningQuestions',
Tag: 'tags',
RemoteUser: 'users',
},
crm: {
Account: 'accounts',
Contact: 'contacts',
EngagementType: 'engagementTypes',
Engagement: 'engagements',
Lead: 'leads',
Note: 'notes',
Opportunity: 'opportunities',
Stage: 'stages',
Task: 'tasks',
User: 'users',
},
filestorage: {
Drive: 'drives',
File: 'files',
Folder: 'folders',
Group: 'groups',
User: 'users',
},
hris: {
BankInfo: 'bankInfo',
Benefit: 'benefits',
Company: 'companies',
Dependent: 'dependents',
EmployeePayrollRun: 'employeePayrollRuns',
Employee: 'employees',
EmployerBenefit: 'employerBenefits',
Employment: 'employments',
Group: 'groups',
Location: 'locations',
PayGroup: 'payGroups',
PayrollRun: 'payrollRuns',
TimeOff: 'timeOff',
TimeOffBalance: 'timeOffBalances',
},
mktg: {
Action: 'actions',
Automation: 'automations',
Campaign: 'campaigns',
Contact: 'contacts',
MarketingEmail: 'marketingEmails',
Event: 'events',
List: 'lists',
Message: 'messages',
Template: 'templates',
User: 'users',
},
ticketing: {
Ticket: 'tickets',
Comment: 'comments',
Attachment: 'attachments',
Collection: 'collections',
Issue: 'issues',
Project: 'projects',
Team: 'teams',
User: 'users',
Tag: 'tags',
},
}
Loading

0 comments on commit 9535565

Please sign in to comment.