diff --git a/components/adyntel/adyntel.app.mjs b/components/adyntel/adyntel.app.mjs index 3d6f2d220d043..8da4a37b92e22 100644 --- a/components/adyntel/adyntel.app.mjs +++ b/components/adyntel/adyntel.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/agentset/agentset.app.mjs b/components/agentset/agentset.app.mjs index fbf090bcc6d46..29ee120e290ea 100644 --- a/components/agentset/agentset.app.mjs +++ b/components/agentset/agentset.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/bloomerang/actions/add-interaction/add-interaction.mjs b/components/bloomerang/actions/add-interaction/add-interaction.mjs new file mode 100644 index 0000000000000..b365426acbbd3 --- /dev/null +++ b/components/bloomerang/actions/add-interaction/add-interaction.mjs @@ -0,0 +1,72 @@ +import bloomerang from "../../bloomerang.app.mjs"; +import { + CHANNEL_OPTIONS, PURPOSE_OPTIONS, +} from "../../common/constants.mjs"; + +export default { + key: "bloomerang-add-interaction", + name: "Add Interaction", + description: "Adds an interaction to an existing constituent in Bloomerang. [See the documentation](https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Interactions/post_interaction)", + version: "0.0.1", + type: "action", + props: { + bloomerang, + constituentId: { + propDefinition: [ + bloomerang, + "constituentId", + ], + }, + date: { + type: "string", + label: "Date", + description: "The date of the interaction", + }, + subject: { + type: "string", + label: "Subject", + description: "The subject od the interation", + }, + channel: { + type: "string", + label: "Channel", + description: "The channel of the interation", + options: CHANNEL_OPTIONS, + }, + purpose: { + type: "string", + label: "Purpose", + description: "The purpose of the interation", + options: PURPOSE_OPTIONS, + }, + note: { + type: "string", + label: "Note", + description: "Note for the interaction", + optional: true, + }, + isInbound: { + type: "boolean", + label: "Is Inbound", + description: "Was the interaction initiated by constituent?", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.bloomerang.createInteraction({ + $, + data: { + AccountId: this.constituentId, + Date: this.date, + Subject: this.subject, + Channel: this.channel, + Purpose: this.purpose, + note: this.note, + IsInbound: this.isInbound, + }, + }); + + $.export("$summary", `Successfully added interaction with ID ${response.Id}`); + return response; + }, +}; diff --git a/components/bloomerang/actions/create-constituent/create-constituent.mjs b/components/bloomerang/actions/create-constituent/create-constituent.mjs new file mode 100644 index 0000000000000..c67280b695519 --- /dev/null +++ b/components/bloomerang/actions/create-constituent/create-constituent.mjs @@ -0,0 +1,167 @@ +import bloomerang from "../../bloomerang.app.mjs"; +import { + COMMUNICATION_CHANNEL_OPTIONS, + CONSTITUENT_GENDER_OPTIONS, + CONSTITUENT_PREFIX_OPTIONS, + CONSTITUENT_STATUS_OPTIONS, + CONSTITUENT_SUFFIX_OPTIONS, + CONSTITUENT_TYPE_OPTIONS, +} from "../../common/constants.mjs"; + +export default { + key: "bloomerang-create-constituent", + name: "Create Constituent", + description: "Creates a new constituent in Bloomerang. [See the documentation](https://bloomerang.co/product/integrations-data-management/api/rest-api/#/Constituents/post_constituent)", + version: "0.0.1", + type: "action", + props: { + bloomerang, + type: { + type: "string", + label: "Constituent Type", + description: "Filter constituents by type", + options: CONSTITUENT_TYPE_OPTIONS, + reloadProps: true, + }, + status: { + type: "string", + label: "Status", + description: "The status of the constituent", + options: CONSTITUENT_STATUS_OPTIONS, + optional: true, + }, + fullName: { + type: "string", + label: "Organization Name", + description: "The organization's name of the constituent", + hidden: true, + }, + firstName: { + type: "string", + label: "First Name", + description: "The first name of the constituent", + hidden: true, + }, + lastName: { + type: "string", + label: "Last Name", + description: "The last name of the constituent", + hidden: true, + }, + middleName: { + type: "string", + label: "Middle Name", + description: "The middle name of the constituent", + optional: true, + }, + prefix: { + type: "string", + label: "Title", + description: "The prefix of the constituent", + options: CONSTITUENT_PREFIX_OPTIONS, + optional: true, + }, + suffix: { + type: "string", + label: "Suffix", + description: "The suffix of the constituent", + options: CONSTITUENT_SUFFIX_OPTIONS, + optional: true, + }, + jobTitle: { + type: "string", + label: "Job Title", + description: "The job title of the constituent", + optional: true, + }, + gender: { + type: "string", + label: "Gender", + description: "The gender of the constituent", + options: CONSTITUENT_GENDER_OPTIONS, + optional: true, + }, + birthdate: { + type: "string", + label: "Birthdate", + description: "The birth date of the constituent", + optional: true, + }, + employer: { + type: "string", + label: "Employer", + description: "The employer of the constituent", + optional: true, + }, + website: { + type: "string", + label: "Website", + description: "An website of the constituent", + optional: true, + }, + facebookId: { + type: "string", + label: "Facebook", + description: "The constituent's facebook page", + optional: true, + }, + twitterId: { + type: "string", + label: "Twitter ID", + description: "The constituent's twitter ID", + optional: true, + }, + linkedInId: { + type: "string", + label: "LinkedIn", + description: "The constituent's linkedIn page", + optional: true, + }, + preferredCommunicationChannel: { + type: "string", + label: "Preferred Communication Channel", + description: "The preferred comunication channel of the constituent", + options: COMMUNICATION_CHANNEL_OPTIONS, + optional: true, + }, + }, + async additionalProps(props) { + const isIndividual = this.type === "Individual"; + props.firstName.hidden = !isIndividual; + props.lastName.hidden = !isIndividual; + props.fullName.hidden = isIndividual; + return {}; + }, + async run({ $ }) { + const data = { + Type: this.type, + Status: this.status, + Prefix: this.prefix, + Suffix: this.suffix, + JobTitle: this.jobTitle, + Gender: this.gender, + Birthdate: this.birthdate, + Employer: this.employer, + Website: this.website, + FacebookId: this.facebookId, + TwitterId: this.twitterId, + LinkedInId: this.linkedInId, + PreferredCommunicationChannel: this.preferredCommunicationChannel, + }; + if (this.type === "Individual") { + data.FirstName = this.firstName; + data.LastName = this.lastName; + data.MiddleName = this.middleName; + } else { + data.FullName = this.fullName; + } + + const response = await this.bloomerang.createConstituent({ + $, + data, + }); + + $.export("$summary", `Successfully created constituent with ID ${response.Id}`); + return response; + }, +}; diff --git a/components/bloomerang/actions/create-donation/create-donation.mjs b/components/bloomerang/actions/create-donation/create-donation.mjs new file mode 100644 index 0000000000000..d88a6e124009d --- /dev/null +++ b/components/bloomerang/actions/create-donation/create-donation.mjs @@ -0,0 +1,85 @@ +import bloomerang from "../../bloomerang.app.mjs"; +import { PAYMENT_METHOD_OPTIONS } from "../../common/constants.mjs"; + +export default { + key: "bloomerang-create-donation", + name: "Create Donation", + description: "Creates a new donation record in Bloomerang. [See the documentation](https://bloomerang.co/product/integrations-data-management/api/rest-api/)", + version: "0.0.1", + type: "action", + props: { + bloomerang, + constituentId: { + propDefinition: [ + bloomerang, + "constituentId", + ], + }, + date: { + type: "string", + label: "Date", + description: "The date of the donation", + }, + amount: { + type: "string", + label: "Amount", + description: "The amount for the donation", + }, + fundId: { + propDefinition: [ + bloomerang, + "fundId", + ], + }, + paymentMethod: { + type: "string", + label: "Payment Method", + description: "The method of payment", + options: PAYMENT_METHOD_OPTIONS, + }, + campaignId: { + propDefinition: [ + bloomerang, + "campaignId", + ], + optional: true, + }, + appealId: { + propDefinition: [ + bloomerang, + "appealId", + ], + optional: true, + }, + note: { + type: "string", + label: "Note", + description: "A note for the donation", + optional: true, + }, + }, + async run({ $ }) { + const response = await this.bloomerang.createDonation({ + $, + data: { + AccountId: this.constituentId, + Date: this.date, + Amount: this.amount, + Method: this.paymentMethod, + Designations: [ + { + FundId: this.fundId, + Amount: this.amount, + Type: "Donation", + CampaignId: this.campaignId, + AppealId: this.appealId, + Note: this.note, + }, + ], + }, + }); + + $.export("$summary", `Successfully created donation with ID: ${response.Id}`); + return response; + }, +}; diff --git a/components/bloomerang/bloomerang.app.mjs b/components/bloomerang/bloomerang.app.mjs index 2c7b573271969..03058b9f0693e 100644 --- a/components/bloomerang/bloomerang.app.mjs +++ b/components/bloomerang/bloomerang.app.mjs @@ -1,11 +1,189 @@ +import { axios } from "@pipedream/platform"; +import { LIMIT } from "./common/constants.mjs"; + export default { type: "app", app: "bloomerang", - propDefinitions: {}, + propDefinitions: { + constituentId: { + type: "string", + label: "Constituent ID", + description: "The ID of the constituent", + async options({ page }) { + const { Results: response } = await this.listConstituents({ + params: { + skip: LIMIT * page, + take: LIMIT, + }, + }); + return response.map(({ + Id: value, FullName: label, + }) => ({ + label, + value, + })); + }, + }, + fundId: { + type: "string", + label: "Fund", + description: "Filter donations by fund", + async options({ page }) { + const { Results: response } = await this.listFunds({ + params: { + skip: LIMIT * page, + take: LIMIT, + }, + }); + return response.map(({ + Id: value, Name: label, + }) => ({ + label, + value, + })); + }, + }, + campaignId: { + type: "string", + label: "Campaign", + description: "Filter interactions by campaign", + async options({ page }) { + const { Results: response } = await this.listCampaigns({ + params: { + skip: LIMIT * page, + take: LIMIT, + }, + }); + return response.map(({ + Id: value, Name: label, + }) => ({ + label, + value, + })); + }, + }, + appealId: { + type: "string", + label: "Appeal", + description: "An appeal for the donation", + async options({ page }) { + const { Results: response } = await this.listAppeals({ + params: { + skip: LIMIT * page, + take: LIMIT, + }, + }); + return response.map(({ + Id: value, Name: label, + }) => ({ + label, + value, + })); + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + _baseUrl() { + return "https://api.bloomerang.co/v2"; + }, + _headers() { + return { + "accept": "application/json", + "x-api-key": `${this.$auth.api_key}`, + }; + }, + _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: this._baseUrl() + path, + headers: this._headers(), + ...opts, + }); + }, + listConstituents(opts = {}) { + return this._makeRequest({ + path: "/constituents", + ...opts, + }); + }, + listInteractions(opts = {}) { + return this._makeRequest({ + path: "/interactions", + ...opts, + }); + }, + listTransactions(opts = {}) { + return this._makeRequest({ + path: "/transactions", + ...opts, + }); + }, + listFunds(opts = {}) { + return this._makeRequest({ + path: "/funds", + ...opts, + }); + }, + listCampaigns(opts = {}) { + return this._makeRequest({ + path: "/campaigns", + ...opts, + }); + }, + listAppeals(opts = {}) { + return this._makeRequest({ + path: "/appeals", + ...opts, + }); + }, + createDonation(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/transaction", + ...opts, + }); + }, + createConstituent(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/constituent", + ...opts, + }); + }, + createInteraction(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/interaction", + ...opts, + }); + }, + async *paginate({ + fn, params = {}, maxResults = null, ...opts + }) { + let hasMore = false; + let count = 0; + let page = 0; + + do { + params.skip = LIMIT * page; + params.take = LIMIT; + page++; + const { Results: data } = await fn({ + params, + ...opts, + }); + for (const d of data) { + yield d; + + if (maxResults && ++count === maxResults) { + return count; + } + } + + hasMore = data.length; + + } while (hasMore); }, }, }; diff --git a/components/bloomerang/common/constants.mjs b/components/bloomerang/common/constants.mjs new file mode 100644 index 0000000000000..41e585712942c --- /dev/null +++ b/components/bloomerang/common/constants.mjs @@ -0,0 +1,173 @@ +export const LIMIT = 50; + +export const CHANNEL_OPTIONS = [ + { + label: "Email", + value: "Email", + }, + { + label: "In Person", + value: "InPerson", + }, + { + label: "Mail", + value: "Mail", + }, + { + label: "Mass Email", + value: "MassEmail", + }, + { + label: "Other", + value: "Other", + }, + { + label: "Phone", + value: "Phone", + }, + { + label: "Social Media", + value: "SocialMedia", + }, + { + label: "Text Message", + value: "TextMessage", + }, + { + label: "Video Call", + value: "VideoCall", + }, + { + label: "Webinar", + value: "Webinar", + }, + { + label: "Website", + value: "Website", + }, +]; + +export const PURPOSE_OPTIONS = [ + { + label: "Acknowledgement", + value: "Acknowledgement", + }, + { + label: "Impact/Cultivation", + value: "ImpactCultivation", + }, + { + label: "Newsletter", + value: "Newsletter", + }, + { + label: "Receipt", + value: "Receipt", + }, + { + label: "Solicitation", + value: "Solicitation", + }, + { + label: "Special Event", + value: "SpecialEvent", + }, + { + label: "Volunteer Activity", + value: "VolunteerActivity", + }, + { + label: "Pledge Reminder", + value: "PledgeReminder", + }, + { + label: "Welcome", + value: "Welcome", + }, + { + label: "Other", + value: "Other", + }, +]; + +export const CONSTITUENT_TYPE_OPTIONS = [ + "Individual", + "Organization", +]; + +export const CONSTITUENT_STATUS_OPTIONS = [ + "Active", + "Inactive", + "Deceased", +]; + +export const CONSTITUENT_PREFIX_OPTIONS = [ + "Atty.", + "Capt", + "Cmdr", + "Coach", + "Col", + "Dr.", + "Fr.", + "Gen", + "Gov.", + "Hon.", + "Lt", + "Maj", + "Master", + "Miss", + "Mr.", + "Mrs.", + "Ms.", + "Mx.", + "Pastor", + "Pres.", + "Prof.", + "Pvt", + "Rabbi", + "Rep.", + "Rev.", + "Sen.", + "Sgt", + "Sir", + "Sr.", +]; + +export const CONSTITUENT_SUFFIX_OPTIONS = [ + "DDS", + "Esq.", + "II", + "III", + "IV", + "Jr.", + "M.D.", + "Ph.D.", + "Sr.", + "V", +]; + +export const CONSTITUENT_GENDER_OPTIONS = [ + "Male", + "Female", + "Other", +]; + +export const COMMUNICATION_CHANNEL_OPTIONS = [ + "Email", + "Phone", + "Text Message", + "Mail", +]; + +export const PAYMENT_METHOD_OPTIONS = [ + "None", + "Cash", + "Check", + "CreditCard", + "Eft", + "InKind", + "ApplePay", + "GooglePay", + "PayPal", + "Venmo", +]; diff --git a/components/bloomerang/package.json b/components/bloomerang/package.json index 37efabd11d289..01ce3fe505ab9 100644 --- a/components/bloomerang/package.json +++ b/components/bloomerang/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/bloomerang", - "version": "0.0.1", + "version": "0.1.0", "description": "Pipedream Bloomerang Components", "main": "bloomerang.app.mjs", "keywords": [ @@ -11,5 +11,8 @@ "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } -} \ No newline at end of file +} diff --git a/components/bloomerang/sources/common/base.mjs b/components/bloomerang/sources/common/base.mjs new file mode 100644 index 0000000000000..37aedeca8305b --- /dev/null +++ b/components/bloomerang/sources/common/base.mjs @@ -0,0 +1,63 @@ +import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import app from "../../bloomerang.app.mjs"; + +export default { + props: { + app, + db: "$.service.db", + timer: { + type: "$.interface.timer", + default: { + intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + }, + }, + }, + methods: { + _getLastId() { + return this.db.get("lastId") || 0; + }, + _setLastId(lastId) { + this.db.set("lastId", lastId); + }, + async emitEvent(maxResults = false) { + const lastId = this._getLastId(); + + const response = this.app.paginate({ + fn: this.getFunction(), + params: { + orderBy: "CreatedDate", + orderDirection: "Desc", + }, + }); + + let responseArray = []; + for await (const item of response) { + if (item.Id <= lastId) break; + responseArray.push(item); + } + + if (responseArray.length) { + if (maxResults && (responseArray.length > maxResults)) { + responseArray.length = maxResults; + } + this._setLastId(responseArray[0].Id); + } + + for (const item of responseArray.reverse()) { + this.$emit(item, { + id: item.Id, + summary: this.getSummary(item), + ts: Date.parse(item.AuditTrail.CreatedDate || new Date()), + }); + } + }, + }, + hooks: { + async deploy() { + await this.emitEvent(25); + }, + }, + async run() { + await this.emitEvent(); + }, +}; diff --git a/components/bloomerang/sources/new-constituent/new-constituent.mjs b/components/bloomerang/sources/new-constituent/new-constituent.mjs new file mode 100644 index 0000000000000..871b14a1e6fba --- /dev/null +++ b/components/bloomerang/sources/new-constituent/new-constituent.mjs @@ -0,0 +1,22 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "bloomerang-new-constituent", + name: "New Constituent Created", + description: "Emit new event when a new constituent profile is created in Bloomerang.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getFunction() { + return this.app.listConstituents; + }, + getSummary(item) { + return `New Constituent: ${item.FullName}`; + }, + }, + sampleEmit, +}; diff --git a/components/bloomerang/sources/new-constituent/test-event.mjs b/components/bloomerang/sources/new-constituent/test-event.mjs new file mode 100644 index 0000000000000..5ea43cc4c3bc2 --- /dev/null +++ b/components/bloomerang/sources/new-constituent/test-event.mjs @@ -0,0 +1,152 @@ +export default { + "Id": 0, + "AccountNumber": 0, + "IsInHousehold": true, + "IsHeadOfHousehold": true, + "IsFavorite": true, + "FullCustomProfileImageId": 0, + "FullCustomProfileImageUrl": "string", + "CroppedCustomProfileImageId": 0, + "CroppedCustomProfileImageUrl": "string", + "Type": "Individual", + "Status": "Active", + "FirstName": "string", + "LastName": "string", + "MiddleName": "string", + "Prefix": "string", + "Suffix": "string", + "FullName": "string", + "InformalName": "string", + "FormalName": "string", + "EnvelopeName": "string", + "RecognitionName": "string", + "JobTitle": "string", + "Employer": "string", + "Website": "string", + "FacebookId": "string", + "TwitterId": "string", + "LinkedInId": "string", + "Gender": "Male", + "Birthdate": "2025-04-02", + "ProfilePictureType": "None", + "PrimaryPhone": { + "Id": 0, + "AccountId": 0, + "Type": "Home", + "Extension": "string", + "Number": "string", + "IsPrimary": true + }, + "HouseholdId": 0, + "PreferredCommunicationChannel": "Email", + "CommunicationRestrictions": [ + "DoNotCall" + ], + "CommunicationRestrictionsUpdateReason": "string", + "EmailInterestType": "All", + "CustomEmailInterests": [ + { + "Id": 0, + "Name": "string" + } + ], + "EmailInterestsUpdateReason": "string", + "PrimaryAddress": { + "Id": 0, + "AccountId": 0, + "Type": "Home", + "Street": "string", + "City": "string", + "State": "string", + "PostalCode": "string", + "Country": "string", + "IsPrimary": true, + "IsBad": true, + "AuditTrail": { + "CreatedDate": "2025-04-02T14:26:18.373Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:26:18.373Z", + "LastModifiedName": "string" + }, + "StateAbbreviation": "string", + "CountryCode": "string" + }, + "PrimaryEmail": { + "Id": 0, + "AccountId": 0, + "Type": "Home", + "Value": "user@example.com", + "IsPrimary": true, + "IsBad": true, + "AuditTrail": { + "CreatedDate": "2025-04-02T14:26:18.373Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:26:18.373Z", + "LastModifiedName": "string" + } + }, + "EngagementScore": "Low", + "DonorSearchInfo": { + "Id": 0, + "GenerosityScore": "Low", + "AnnualFundLikelihood": "Low", + "MajorGiftLikelihood": "Low", + "Quality": "Low", + "LargestGiftMin": 0, + "LargestGiftMax": 0, + "WealthAskMin": 0, + "WealthAskMax": 0, + "BusinessExecutive": true, + "NamesScreened": "string", + "DateTimeScreenedUtc": "string" + }, + "AddressIds": [ + 0 + ], + "EmailIds": [ + 0 + ], + "PhoneIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "GroupsDetails": [ + { + "Id": 0, + "Name": "string", + "Description": "string" + } + ], + "AuditTrail": { + "CreatedDate": "2025-04-02T14:26:18.373Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:26:18.373Z", + "LastModifiedName": "string" + }, + "Membership": [ + { + "MembershipScheduleId": 0, + "MembershipProgramName": "string", + "MembershipLevelName": "string", + "MembershipStatus": "string", + "MembershipRenewalDate": "string" + } + ] +} \ No newline at end of file diff --git a/components/bloomerang/sources/new-donation/new-donation.mjs b/components/bloomerang/sources/new-donation/new-donation.mjs new file mode 100644 index 0000000000000..eb10cfb0d6543 --- /dev/null +++ b/components/bloomerang/sources/new-donation/new-donation.mjs @@ -0,0 +1,22 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "bloomerang-new-donation", + name: "New Donation", + description: "Emit new event when a donation is received in Bloomerang.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getFunction() { + return this.app.listTransactions; + }, + getSummary(item) { + return `New Donation from ${item.AccountId}`; + }, + }, + sampleEmit, +}; diff --git a/components/bloomerang/sources/new-donation/test-event.mjs b/components/bloomerang/sources/new-donation/test-event.mjs new file mode 100644 index 0000000000000..bca587c5544ca --- /dev/null +++ b/components/bloomerang/sources/new-donation/test-event.mjs @@ -0,0 +1,402 @@ +export default { + "Id": 0, + "TransactionNumber": 0, + "NonDeductibleAmount": 0, + "AccountId": 0, + "Date": "2025-04-02", + "Amount": 0, + "Method": "None", + "EntryMethod": "Tap", + "MethodOrigin": "Forms", + "CheckNumber": "string", + "CheckDate": "2025-04-02", + "CreditCardType": "Visa", + "CreditCardLastFourDigits": "string", + "CreditCardExpMonth": 0, + "CreditCardExpYear": 0, + "EftAccountType": "Checking", + "EftLastFourDigits": "string", + "EftRoutingNumber": "string", + "InKindDescription": "string", + "InKindType": "Goods", + "InKindMarketValue": 0, + "IntegrationUrl": "string", + "Designations": [ + { + "Id": 0, + "DesignationNumber": 0, + "TransactionId": 0, + "Amount": 0, + "NonDeductibleAmount": 0, + "Note": "string", + "AcknowledgementStatus": "Yes", + "AcknowledgementInteractionIds": [ + 0 + ], + "Fund": { + "Id": 0, + "Name": "string" + }, + "QuickbooksAccount": { + "Id": 0, + "Name": "string" + }, + "Campaign": { + "Id": 0, + "Name": "string" + }, + "Appeal": { + "Id": 0, + "Name": "string" + }, + "Tribute": { + "Id": 0, + "Name": "string" + }, + "TributeType": "InHonorOf", + "SoftCreditIds": [ + 0 + ], + "AttachmentIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "QuickBooksOnlineStatus": "string", + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.376Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.376Z", + "LastModifiedName": "string" + }, + "Type": "Donation" + }, + { + "Id": 0, + "DesignationNumber": 0, + "TransactionId": 0, + "Amount": 0, + "NonDeductibleAmount": 0, + "Note": "string", + "AcknowledgementStatus": "Yes", + "AcknowledgementInteractionIds": [ + 0 + ], + "Fund": { + "Id": 0, + "Name": "string" + }, + "QuickbooksAccount": { + "Id": 0, + "Name": "string" + }, + "Campaign": { + "Id": 0, + "Name": "string" + }, + "Appeal": { + "Id": 0, + "Name": "string" + }, + "Tribute": { + "Id": 0, + "Name": "string" + }, + "TributeType": "InHonorOf", + "SoftCreditIds": [ + 0 + ], + "AttachmentIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "QuickBooksOnlineStatus": "string", + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.376Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.376Z", + "LastModifiedName": "string" + }, + "Type": "Pledge", + "PledgePaymentIds": [ + 0 + ], + "PledgeInstallments": [ + { + "Id": 0, + "PledgeId": 0, + "Date": "2025-04-02", + "Amount": 0 + } + ], + "PledgeBalance": 0, + "LastPaymentStatus": "AtRisk", + "PledgeStatus": "InGoodStanding", + "PledgeWriteOffs": [ + { + "Id": 0, + "PledgeId": 0, + "Date": "2025-04-02", + "Amount": 0 + } + ], + "PledgeAmountInArrears": 0, + "PledgeNextInstallmentDate": "2025-04-02", + "PledgeFrequencyIsEditable": true + }, + { + "Id": 0, + "DesignationNumber": 0, + "TransactionId": 0, + "Amount": 0, + "NonDeductibleAmount": 0, + "Note": "string", + "AcknowledgementStatus": "Yes", + "AcknowledgementInteractionIds": [ + 0 + ], + "Fund": { + "Id": 0, + "Name": "string" + }, + "QuickbooksAccount": { + "Id": 0, + "Name": "string" + }, + "Campaign": { + "Id": 0, + "Name": "string" + }, + "Appeal": { + "Id": 0, + "Name": "string" + }, + "Tribute": { + "Id": 0, + "Name": "string" + }, + "TributeType": "InHonorOf", + "SoftCreditIds": [ + 0 + ], + "AttachmentIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "QuickBooksOnlineStatus": "string", + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.376Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.376Z", + "LastModifiedName": "string" + }, + "Type": "PledgePayment", + "PledgeId": 0 + }, + { + "Id": 0, + "DesignationNumber": 0, + "TransactionId": 0, + "Amount": 0, + "NonDeductibleAmount": 0, + "Note": "string", + "AcknowledgementStatus": "Yes", + "AcknowledgementInteractionIds": [ + 0 + ], + "Fund": { + "Id": 0, + "Name": "string" + }, + "QuickbooksAccount": { + "Id": 0, + "Name": "string" + }, + "Campaign": { + "Id": 0, + "Name": "string" + }, + "Appeal": { + "Id": 0, + "Name": "string" + }, + "Tribute": { + "Id": 0, + "Name": "string" + }, + "TributeType": "InHonorOf", + "SoftCreditIds": [ + 0 + ], + "AttachmentIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "QuickBooksOnlineStatus": "string", + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.377Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.377Z", + "LastModifiedName": "string" + }, + "RecurringDonationEndDate": "2025-04-02", + "RecurringDonationFrequency": "Weekly", + "RecurringDonationDay1": 0, + "RecurringDonationDay2": 0, + "RecurringDonationStartDate": "2025-04-02", + "Type": "RecurringDonation", + "RecurringDonationPaymentIds": [ + 0 + ], + "RecurringDonationNextInstallmentDate": "2025-04-02", + "RecurringDonationLastPaymentStatus": "AtRisk", + "RecurringDonationStatus": "Active" + }, + { + "Id": 0, + "DesignationNumber": 0, + "TransactionId": 0, + "Amount": 0, + "NonDeductibleAmount": 0, + "Note": "string", + "AcknowledgementStatus": "Yes", + "AcknowledgementInteractionIds": [ + 0 + ], + "Fund": { + "Id": 0, + "Name": "string" + }, + "QuickbooksAccount": { + "Id": 0, + "Name": "string" + }, + "Campaign": { + "Id": 0, + "Name": "string" + }, + "Appeal": { + "Id": 0, + "Name": "string" + }, + "Tribute": { + "Id": 0, + "Name": "string" + }, + "TributeType": "InHonorOf", + "SoftCreditIds": [ + 0 + ], + "AttachmentIds": [ + 0 + ], + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "QuickBooksOnlineStatus": "string", + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.377Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.377Z", + "LastModifiedName": "string" + }, + "Type": "RecurringDonationPayment", + "RecurringDonationId": 0 + } + ], + "AttachmentIds": [ + 0 + ], + "IsRefunded": "Yes", + "RefundIds": [ + 0 + ], + "AuditTrail": { + "CreatedDate": "2025-04-02T14:25:37.377Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:25:37.377Z", + "LastModifiedName": "string" + } +} \ No newline at end of file diff --git a/components/bloomerang/sources/new-interaction/new-interaction.mjs b/components/bloomerang/sources/new-interaction/new-interaction.mjs new file mode 100644 index 0000000000000..e6b723d9baa9b --- /dev/null +++ b/components/bloomerang/sources/new-interaction/new-interaction.mjs @@ -0,0 +1,22 @@ +import common from "../common/base.mjs"; +import sampleEmit from "./test-event.mjs"; + +export default { + ...common, + key: "bloomerang-new-interaction", + name: "New Interaction", + description: "Emit new event when a new interaction is logged for a constituent.", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getFunction() { + return this.app.listInteractions; + }, + getSummary(item) { + return `New Interaction: ${item.Channel}`; + }, + }, + sampleEmit, +}; diff --git a/components/bloomerang/sources/new-interaction/test-event.mjs b/components/bloomerang/sources/new-interaction/test-event.mjs new file mode 100644 index 0000000000000..febf3a4910495 --- /dev/null +++ b/components/bloomerang/sources/new-interaction/test-event.mjs @@ -0,0 +1,50 @@ +export default { + "Id": 0, + "Date": "2025-04-02", + "Note": "string", + "Channel": "Email", + "Purpose": "Acknowledgement", + "Subject": "string", + "IsInbound": true, + "AccountId": 0, + "TweetId": "string", + "IsBcc": true, + "EmailAddress": "user@example.com", + "AttachmentIds": [ + 0 + ], + "LetterAttachmentIds": [ + 0 + ], + "SurveyLapsedResponses": [ + "string" + ], + "IsEngagementSurveyResponse": true, + "SurveyEmailInteractionId": 0, + "IsEngagementSurveyEmail": true, + "SurveyResponseInteractionId": 0, + "CustomValues": [ + { + "FieldId": 0, + "Value": { + "Id": 0, + "Value": "string" + } + }, + { + "FieldId": 0, + "Values": [ + { + "Id": 0, + "Value": "string" + } + ] + } + ], + "AuditTrail": { + "CreatedDate": "2025-04-02T14:22:12.409Z", + "CreatedName": "string", + "LastModifiedDate": "2025-04-02T14:22:12.409Z", + "LastModifiedName": "string" + } +} \ No newline at end of file diff --git a/components/changes_page/changes_page.app.mjs b/components/changes_page/changes_page.app.mjs index 84b2665da266f..94072dd5b5b5c 100644 --- a/components/changes_page/changes_page.app.mjs +++ b/components/changes_page/changes_page.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/cvr_dev/cvr_dev.app.mjs b/components/cvr_dev/cvr_dev.app.mjs index 38db3aa520354..881873b59df77 100644 --- a/components/cvr_dev/cvr_dev.app.mjs +++ b/components/cvr_dev/cvr_dev.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/hamsa/hamsa.app.mjs b/components/hamsa/hamsa.app.mjs index b947004d61afb..f531675faa474 100644 --- a/components/hamsa/hamsa.app.mjs +++ b/components/hamsa/hamsa.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/microbilt_developer/microbilt_developer.app.mjs b/components/microbilt_developer/microbilt_developer.app.mjs index ec86c93b28301..0693f09a69d8c 100644 --- a/components/microbilt_developer/microbilt_developer.app.mjs +++ b/components/microbilt_developer/microbilt_developer.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/milvus/milvus.app.mjs b/components/milvus/milvus.app.mjs index 1c02a3e8266b0..1b4e96d312d5e 100644 --- a/components/milvus/milvus.app.mjs +++ b/components/milvus/milvus.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/onehash/onehash.app.mjs b/components/onehash/onehash.app.mjs index 07d80e6b680b2..da29192e7e434 100644 --- a/components/onehash/onehash.app.mjs +++ b/components/onehash/onehash.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/public_record/public_record.app.mjs b/components/public_record/public_record.app.mjs index 6233bb179019c..44c2f6a5b3cd7 100644 --- a/components/public_record/public_record.app.mjs +++ b/components/public_record/public_record.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/pushengage/pushengage.app.mjs b/components/pushengage/pushengage.app.mjs index cd97b28fed7c6..79f245c6f7f7c 100644 --- a/components/pushengage/pushengage.app.mjs +++ b/components/pushengage/pushengage.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/satws/satws.app.mjs b/components/satws/satws.app.mjs index 1fb3280162e83..f6452a9de2136 100644 --- a/components/satws/satws.app.mjs +++ b/components/satws/satws.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/savvy_folders/savvy_folders.app.mjs b/components/savvy_folders/savvy_folders.app.mjs index a0feb546f92d4..a80c23837c3a7 100644 --- a/components/savvy_folders/savvy_folders.app.mjs +++ b/components/savvy_folders/savvy_folders.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/speak_ai/speak_ai.app.mjs b/components/speak_ai/speak_ai.app.mjs index 401d4656a64bd..9d1e6797d11e0 100644 --- a/components/speak_ai/speak_ai.app.mjs +++ b/components/speak_ai/speak_ai.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/components/thesportsdb/thesportsdb.app.mjs b/components/thesportsdb/thesportsdb.app.mjs index 6713384c45883..987d40dba3071 100644 --- a/components/thesportsdb/thesportsdb.app.mjs +++ b/components/thesportsdb/thesportsdb.app.mjs @@ -8,4 +8,4 @@ export default { console.log(Object.keys(this.$auth)); }, }, -}; \ No newline at end of file +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f08ae32fb9e9..07c412bc45a69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1596,7 +1596,11 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/bloomerang: {} + components/bloomerang: + dependencies: + '@pipedream/platform': + specifier: ^3.0.3 + version: 3.0.3 components/blue: {} @@ -8815,8 +8819,7 @@ importers: specifier: ^3.0.0 version: 3.0.3 - components/onehash: - specifiers: {} + components/onehash: {} components/onelogin: {} @@ -10155,8 +10158,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/public_record: - specifiers: {} + components/public_record: {} components/publisherkit: dependencies: @@ -10206,8 +10208,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/pushengage: - specifiers: {} + components/pushengage: {} components/pusher: dependencies: @@ -27887,22 +27888,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) + deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} @@ -34495,6 +34496,8 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) + transitivePeerDependencies: + - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: