@segment/action-destinations 3.134.1-staging.1 → 3.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/actable-predictive/index.js +1 -1
- package/dist/destinations/actable-predictive/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js +13 -13
- package/dist/destinations/actable-predictive/sendCustomEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js +20 -20
- package/dist/destinations/actable-predictive/sendEmailEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js +28 -28
- package/dist/destinations/actable-predictive/sendTransactionEvent/index.js.map +1 -1
- package/dist/destinations/actable-predictive/sendWebEvent/index.js +25 -25
- package/dist/destinations/actable-predictive/sendWebEvent/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.d.ts +18 -12
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js +305 -32
- package/dist/destinations/blackbaud-raisers-edge-nxt/api/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.d.ts +3 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js +4 -2
- package/dist/destinations/blackbaud-raisers-edge-nxt/constants/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.d.ts +4 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.js +30 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/fixtures.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/generated-types.d.ts +53 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/generated-types.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.d.ts +5 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.js +146 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createConstituentAction/index.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.d.ts +27 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js +60 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/fixtures.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.d.ts +63 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/generated-types.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js +230 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createGift/index.js.map +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/fixtures.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/generated-types.d.ts +1 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.d.ts +3 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js +277 -550
- package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/index.js +4 -0
- package/dist/destinations/blackbaud-raisers-edge-nxt/index.js.map +1 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/types/index.d.ts +81 -8
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.d.ts +10 -1
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js +195 -5
- package/dist/destinations/blackbaud-raisers-edge-nxt/utils/index.js.map +1 -1
- package/dist/destinations/braze/trackEvent/generated-types.d.ts +1 -0
- package/dist/destinations/braze/trackEvent/index.js +11 -35
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/trackPurchase/index.js +2 -43
- package/dist/destinations/braze/trackPurchase/index.js.map +1 -1
- package/dist/destinations/braze/utils.d.ts +7 -0
- package/dist/destinations/braze/utils.js +103 -0
- package/dist/destinations/braze/utils.js.map +1 -0
- package/dist/destinations/braze-cohorts/syncAudiences/index.js +1 -1
- package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
- package/dist/destinations/clevertap/userDelete/index.js +4 -4
- package/dist/destinations/clevertap/userDelete/index.js.map +1 -1
- package/dist/destinations/cordial/addContactToList/index.js.map +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/cordial-client.js +2 -2
- package/dist/destinations/cordial/createContactactivity/index.js.map +1 -1
- package/dist/destinations/cordial/identities-fields.d.ts +1 -1
- package/dist/destinations/cordial/identities-fields.js +1 -1
- package/dist/destinations/cordial/identities-fields.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/mergeContacts/index.js.map +1 -1
- package/dist/destinations/cordial/removeContactFromList/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/addUserToAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js +11 -2
- package/dist/destinations/criteo-audiences/addUserToAudience/index.js.map +1 -1
- package/dist/destinations/criteo-audiences/criteo-audiences.d.ts +1 -0
- package/dist/destinations/criteo-audiences/criteo-audiences.js +11 -2
- package/dist/destinations/criteo-audiences/criteo-audiences.js.map +1 -1
- package/dist/destinations/criteo-audiences/removeUserFromAudience/generated-types.d.ts +1 -0
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js +11 -2
- package/dist/destinations/criteo-audiences/removeUserFromAudience/index.js.map +1 -1
- package/dist/destinations/emarsys/triggerEvent/index.js +1 -0
- package/dist/destinations/emarsys/triggerEvent/index.js.map +1 -1
- package/dist/destinations/emarsys/upsertContact/generated-types.d.ts +1 -0
- package/dist/destinations/emarsys/upsertContact/index.js +1 -0
- package/dist/destinations/emarsys/upsertContact/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.d.ts +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +5 -2
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.d.ts +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +4 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +1 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/addToCart/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.d.ts +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js +2 -2
- package/dist/destinations/facebook-conversions-api/fb-capi-properties.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js +13 -1
- package/dist/destinations/facebook-conversions-api/fb-capi-user-data.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/pageView/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/purchase/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/purchase/index.js +3 -3
- package/dist/destinations/facebook-conversions-api/purchase/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/search/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +2 -0
- package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +14 -10
- package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToCart/index.js +11 -7
- package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/addToWishlist/index.js +13 -9
- package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/beginCheckout/index.js +11 -7
- package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/customEvent/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/customEvent/index.js +10 -6
- package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-functions.d.ts +7 -0
- package/dist/destinations/google-analytics-4/ga4-functions.js +44 -7
- package/dist/destinations/google-analytics-4/ga4-functions.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-properties.d.ts +2 -0
- package/dist/destinations/google-analytics-4/ga4-properties.js +17 -3
- package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -1
- package/dist/destinations/google-analytics-4/ga4-types.d.ts +14 -0
- package/dist/destinations/google-analytics-4/ga4-types.js +6 -0
- package/dist/destinations/google-analytics-4/ga4-types.js.map +1 -1
- package/dist/destinations/google-analytics-4/generateLead/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/generateLead/index.js +11 -7
- package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/generated-types.d.ts +2 -1
- package/dist/destinations/google-analytics-4/index.js +16 -11
- package/dist/destinations/google-analytics-4/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/login/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/login/index.js +10 -6
- package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/pageView/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/pageView/index.js +10 -6
- package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/purchase/index.js +11 -7
- package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/refund/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/refund/index.js +13 -9
- package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/removeFromCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/removeFromCart/index.js +13 -9
- package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/search/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/search/index.js +10 -6
- package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectItem/index.js +11 -7
- package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/selectPromotion/index.js +11 -7
- package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/signUp/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/signUp/index.js +10 -6
- package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewCart/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewCart/index.js +13 -9
- package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItem/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewItemList/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewItemList/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
- package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +3 -1
- package/dist/destinations/google-analytics-4/viewPromotion/index.js +11 -7
- package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +2 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/index.js +3 -10
- package/dist/destinations/google-sheets-dev/index.js.map +1 -1
- package/dist/destinations/hubspot/errors.d.ts +2 -1
- package/dist/destinations/hubspot/errors.js +2 -1
- package/dist/destinations/hubspot/errors.js.map +1 -1
- package/dist/destinations/index.js +2 -2
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/intercom/groupIdentifyContact/index.js +1 -0
- package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -1
- package/dist/destinations/ironclad/recordAction.types.d.ts +12 -0
- package/dist/destinations/{braze-cohorts/cohortChanges.js → ironclad/recordAction.types.js} +1 -1
- package/dist/destinations/ironclad/recordAction.types.js.map +1 -0
- package/dist/destinations/linkedin-audiences/index.js +2 -2
- package/dist/destinations/linkedin-audiences/index.js.map +1 -1
- package/dist/destinations/mixpanel/index.js +1 -1
- package/dist/destinations/mixpanel/mixpanel-properties.js +0 -8
- package/dist/destinations/mixpanel/mixpanel-properties.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js +1 -1
- package/dist/destinations/mixpanel/trackEvent/functions.js.map +1 -1
- package/dist/destinations/mixpanel/trackEvent/generated-types.d.ts +0 -3
- package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
- package/dist/destinations/mixpanel/trackPurchase/generated-types.d.ts +0 -3
- package/dist/destinations/mixpanel/trackPurchase/index.js.map +1 -1
- package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.d.ts +14 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.js +83 -0
- package/dist/destinations/outfunnel/forwardGroupEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.d.ts +13 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js +76 -0
- package/dist/destinations/outfunnel/forwardIdentifyEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.d.ts +15 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.d.ts +5 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.js +96 -0
- package/dist/destinations/outfunnel/forwardTrackEvent/index.js.map +1 -0
- package/dist/destinations/outfunnel/generated-types.d.ts +4 -0
- package/dist/destinations/outfunnel/generated-types.js.map +1 -0
- package/dist/destinations/outfunnel/index.js +54 -0
- package/dist/destinations/outfunnel/index.js.map +1 -0
- package/dist/destinations/outfunnel/presets.d.ts +2 -0
- package/dist/destinations/outfunnel/presets.js +31 -0
- package/dist/destinations/outfunnel/presets.js.map +1 -0
- package/dist/destinations/outfunnel/utils.d.ts +1 -0
- package/dist/destinations/outfunnel/utils.js +7 -0
- package/dist/destinations/outfunnel/utils.js.map +1 -0
- package/dist/destinations/qualtrics/qualtricsApiClient.js +3 -1
- package/dist/destinations/qualtrics/qualtricsApiClient.js.map +1 -1
- package/dist/destinations/ripe/group/index.js +0 -1
- package/dist/destinations/ripe/group/index.js.map +1 -1
- package/dist/destinations/ripe/identify/index.js +0 -1
- package/dist/destinations/ripe/identify/index.js.map +1 -1
- package/dist/destinations/ripe/page/index.js +0 -1
- package/dist/destinations/ripe/page/index.js.map +1 -1
- package/dist/destinations/ripe/track/index.js +0 -1
- package/dist/destinations/ripe/track/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +0 -1
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/segment/errors.d.ts +3 -3
- package/dist/destinations/segment/errors.js +2 -2
- package/dist/destinations/segment/errors.js.map +1 -1
- package/dist/destinations/segment/segment-properties.js +2 -1
- package/dist/destinations/segment/segment-properties.js.map +1 -1
- package/dist/destinations/segment/sendTrack/generated-types.d.ts +1 -1
- package/dist/destinations/segment-profiles/errors.d.ts +3 -3
- package/dist/destinations/segment-profiles/errors.js +2 -2
- package/dist/destinations/segment-profiles/errors.js.map +1 -1
- package/dist/destinations/segment-profiles/segment-properties.js +1 -1
- package/dist/destinations/toplyne/constants.d.ts +1 -0
- package/dist/destinations/toplyne/constants.js +5 -0
- package/dist/destinations/toplyne/constants.js.map +1 -0
- package/dist/destinations/{google-sheets-partner → toplyne}/generated-types.d.ts +1 -0
- package/dist/destinations/toplyne/generated-types.js.map +1 -0
- package/dist/destinations/{tiktok-audiences → toplyne}/index.d.ts +1 -1
- package/dist/destinations/toplyne/index.js +69 -0
- package/dist/destinations/toplyne/index.js.map +1 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.d.ts +7 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendAccountProfiles/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendAccountProfiles/index.js +49 -0
- package/dist/destinations/toplyne/sendAccountProfiles/index.js.map +1 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.d.ts +10 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendEvents/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendEvents/index.js +70 -0
- package/dist/destinations/toplyne/sendEvents/index.js.map +1 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.d.ts +8 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.js +3 -0
- package/dist/destinations/toplyne/sendUserProfiles/generated-types.js.map +1 -0
- package/dist/destinations/toplyne/sendUserProfiles/index.js +56 -0
- package/dist/destinations/toplyne/sendUserProfiles/index.js.map +1 -0
- package/dist/destinations/twilio/sendSMS.types.d.ts +1 -0
- package/dist/destinations/voucherify/index.js +1 -1
- package/dist/destinations/voucherify/index.js.map +1 -1
- package/package.json +5 -4
- package/dist/destinations/actions-bingads/functions.d.ts +0 -0
- package/dist/destinations/actions-bingads/functions.js +0 -2
- package/dist/destinations/actions-bingads/functions.js.map +0 -1
- package/dist/destinations/actions-bingads/generated-types.d.ts +0 -10
- package/dist/destinations/actions-bingads/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/index.js +0 -77
- package/dist/destinations/actions-bingads/index.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/formatter.d.ts +0 -8
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js +0 -33
- package/dist/destinations/actions-bingads/offlineConversions/formatter.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.d.ts +0 -7
- package/dist/destinations/actions-bingads/offlineConversions/generated-types.js.map +0 -1
- package/dist/destinations/actions-bingads/offlineConversions/index.js +0 -131
- package/dist/destinations/actions-bingads/offlineConversions/index.js.map +0 -1
- package/dist/destinations/braze-cohorts/cohortChanges.d.ts +0 -10
- package/dist/destinations/braze-cohorts/cohortChanges.js.map +0 -1
- package/dist/destinations/google-sheets-partner/constants.d.ts +0 -3
- package/dist/destinations/google-sheets-partner/constants.js +0 -7
- package/dist/destinations/google-sheets-partner/constants.js.map +0 -1
- package/dist/destinations/google-sheets-partner/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/googleapis/index.d.ts +0 -17
- package/dist/destinations/google-sheets-partner/googleapis/index.js +0 -34
- package/dist/destinations/google-sheets-partner/googleapis/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/index.d.ts +0 -4
- package/dist/destinations/google-sheets-partner/index.js +0 -43
- package/dist/destinations/google-sheets-partner/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.d.ts +0 -11
- package/dist/destinations/google-sheets-partner/postSheet/generated-types.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/index.js +0 -79
- package/dist/destinations/google-sheets-partner/postSheet/index.js.map +0 -1
- package/dist/destinations/google-sheets-partner/postSheet/operations.d.ts +0 -10
- package/dist/destinations/google-sheets-partner/postSheet/operations.js +0 -96
- package/dist/destinations/google-sheets-partner/postSheet/operations.js.map +0 -1
- package/dist/destinations/tiktok-audiences/addUser/generated-types.d.ts +0 -12
- package/dist/destinations/tiktok-audiences/addUser/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/addUser/index.js +0 -47
- package/dist/destinations/tiktok-audiences/addUser/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/api/api.test.d.ts +0 -1
- package/dist/destinations/tiktok-audiences/api/api.test.js +0 -118
- package/dist/destinations/tiktok-audiences/api/api.test.js.map +0 -1
- package/dist/destinations/tiktok-audiences/api/index.d.ts +0 -13
- package/dist/destinations/tiktok-audiences/api/index.js +0 -93
- package/dist/destinations/tiktok-audiences/api/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/constants.d.ts +0 -2
- package/dist/destinations/tiktok-audiences/constants.js +0 -6
- package/dist/destinations/tiktok-audiences/constants.js.map +0 -1
- package/dist/destinations/tiktok-audiences/functions.d.ts +0 -14
- package/dist/destinations/tiktok-audiences/functions.js +0 -116
- package/dist/destinations/tiktok-audiences/functions.js.map +0 -1
- package/dist/destinations/tiktok-audiences/generated-types.d.ts +0 -3
- package/dist/destinations/tiktok-audiences/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/index.js +0 -38
- package/dist/destinations/tiktok-audiences/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/properties.d.ts +0 -11
- package/dist/destinations/tiktok-audiences/properties.js +0 -80
- package/dist/destinations/tiktok-audiences/properties.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeUser/generated-types.d.ts +0 -12
- package/dist/destinations/tiktok-audiences/removeUser/generated-types.js.map +0 -1
- package/dist/destinations/tiktok-audiences/removeUser/index.js +0 -47
- package/dist/destinations/tiktok-audiences/removeUser/index.js.map +0 -1
- package/dist/destinations/tiktok-audiences/types.d.ts +0 -33
- package/dist/destinations/tiktok-audiences/types.js +0 -3
- package/dist/destinations/tiktok-audiences/types.js.map +0 -1
- /package/dist/destinations/{actions-bingads → blackbaud-raisers-edge-nxt/createConstituentAction}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads/offlineConversions → blackbaud-raisers-edge-nxt/createGift}/generated-types.js +0 -0
- /package/dist/destinations/{google-sheets-partner/postSheet → blackbaud-raisers-edge-nxt/createGift}/index.d.ts +0 -0
- /package/dist/destinations/{google-sheets-partner → outfunnel/forwardGroupEvent}/generated-types.js +0 -0
- /package/dist/destinations/{google-sheets-partner/postSheet → outfunnel/forwardIdentifyEvent}/generated-types.js +0 -0
- /package/dist/destinations/{tiktok-audiences/addUser → outfunnel/forwardTrackEvent}/generated-types.js +0 -0
- /package/dist/destinations/{tiktok-audiences → outfunnel}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads → outfunnel}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/removeUser → toplyne}/generated-types.js +0 -0
- /package/dist/destinations/{actions-bingads/offlineConversions → toplyne/sendAccountProfiles}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/addUser → toplyne/sendEvents}/index.d.ts +0 -0
- /package/dist/destinations/{tiktok-audiences/removeUser → toplyne/sendUserProfiles}/index.d.ts +0 -0
package/dist/destinations/blackbaud-raisers-edge-nxt/createOrUpdateIndividualConstituent/index.js
CHANGED
|
@@ -1,619 +1,346 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.perform = exports.fields = void 0;
|
|
4
4
|
const api_1 = require("../api");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
properties: {
|
|
16
|
-
address_lines: {
|
|
17
|
-
label: 'Address Lines',
|
|
18
|
-
type: 'string'
|
|
19
|
-
},
|
|
20
|
-
city: {
|
|
21
|
-
label: 'City',
|
|
22
|
-
type: 'string'
|
|
23
|
-
},
|
|
24
|
-
country: {
|
|
25
|
-
label: 'Country',
|
|
26
|
-
type: 'string'
|
|
27
|
-
},
|
|
28
|
-
do_not_mail: {
|
|
29
|
-
label: 'Do Not Mail',
|
|
30
|
-
type: 'boolean'
|
|
31
|
-
},
|
|
32
|
-
postal_code: {
|
|
33
|
-
label: 'ZIP/Postal Code',
|
|
34
|
-
type: 'string'
|
|
35
|
-
},
|
|
36
|
-
primary: {
|
|
37
|
-
label: 'Is Primary',
|
|
38
|
-
type: 'boolean'
|
|
39
|
-
},
|
|
40
|
-
state: {
|
|
41
|
-
label: 'State/Province',
|
|
42
|
-
type: 'string'
|
|
43
|
-
},
|
|
44
|
-
type: {
|
|
45
|
-
label: 'Address Type',
|
|
46
|
-
type: 'string'
|
|
47
|
-
}
|
|
6
|
+
exports.fields = {
|
|
7
|
+
address: {
|
|
8
|
+
label: 'Address',
|
|
9
|
+
description: "The constituent's address.",
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
address_lines: {
|
|
13
|
+
label: 'Address Lines',
|
|
14
|
+
type: 'string'
|
|
48
15
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
country: {
|
|
77
|
-
'@if': {
|
|
78
|
-
exists: {
|
|
79
|
-
'@path': '$.traits.address.country'
|
|
80
|
-
},
|
|
81
|
-
then: {
|
|
82
|
-
'@path': '$.traits.address.country'
|
|
83
|
-
},
|
|
84
|
-
else: {
|
|
85
|
-
'@path': '$.properties.address.country'
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
do_not_mail: '',
|
|
90
|
-
postal_code: {
|
|
91
|
-
'@if': {
|
|
92
|
-
exists: {
|
|
93
|
-
'@path': '$.traits.address.postalCode'
|
|
94
|
-
},
|
|
95
|
-
then: {
|
|
96
|
-
'@path': '$.traits.address.postalCode'
|
|
97
|
-
},
|
|
98
|
-
else: {
|
|
99
|
-
'@path': '$.properties.address.postalCode'
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
primary: '',
|
|
104
|
-
state: {
|
|
105
|
-
'@if': {
|
|
106
|
-
exists: {
|
|
107
|
-
'@path': '$.traits.address.state'
|
|
108
|
-
},
|
|
109
|
-
then: {
|
|
110
|
-
'@path': '$.traits.address.state'
|
|
111
|
-
},
|
|
112
|
-
else: {
|
|
113
|
-
'@path': '$.properties.address.state'
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
type: ''
|
|
16
|
+
city: {
|
|
17
|
+
label: 'City',
|
|
18
|
+
type: 'string'
|
|
19
|
+
},
|
|
20
|
+
country: {
|
|
21
|
+
label: 'Country',
|
|
22
|
+
type: 'string'
|
|
23
|
+
},
|
|
24
|
+
do_not_mail: {
|
|
25
|
+
label: 'Do Not Mail',
|
|
26
|
+
type: 'boolean'
|
|
27
|
+
},
|
|
28
|
+
postal_code: {
|
|
29
|
+
label: 'ZIP/Postal Code',
|
|
30
|
+
type: 'string'
|
|
31
|
+
},
|
|
32
|
+
primary: {
|
|
33
|
+
label: 'Is Primary',
|
|
34
|
+
type: 'boolean'
|
|
35
|
+
},
|
|
36
|
+
state: {
|
|
37
|
+
label: 'State/Province',
|
|
38
|
+
type: 'string'
|
|
39
|
+
},
|
|
40
|
+
type: {
|
|
41
|
+
label: 'Address Type',
|
|
42
|
+
type: 'string'
|
|
118
43
|
}
|
|
119
44
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
description: "The constituent's birthdate.",
|
|
123
|
-
type: 'datetime',
|
|
124
|
-
default: {
|
|
45
|
+
default: {
|
|
46
|
+
address_lines: {
|
|
125
47
|
'@if': {
|
|
126
48
|
exists: {
|
|
127
|
-
'@path': '$.traits.
|
|
49
|
+
'@path': '$.traits.address.street'
|
|
128
50
|
},
|
|
129
51
|
then: {
|
|
130
|
-
'@path': '$.traits.
|
|
52
|
+
'@path': '$.traits.address.street'
|
|
131
53
|
},
|
|
132
54
|
else: {
|
|
133
|
-
'@path': '$.properties.
|
|
55
|
+
'@path': '$.properties.address.street'
|
|
134
56
|
}
|
|
135
57
|
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
email: {
|
|
139
|
-
label: 'Email',
|
|
140
|
-
description: "The constituent's email address.",
|
|
141
|
-
type: 'object',
|
|
142
|
-
properties: {
|
|
143
|
-
address: {
|
|
144
|
-
label: 'Email Address',
|
|
145
|
-
type: 'string'
|
|
146
|
-
},
|
|
147
|
-
do_not_email: {
|
|
148
|
-
label: 'Do Not Email',
|
|
149
|
-
type: 'boolean'
|
|
150
|
-
},
|
|
151
|
-
primary: {
|
|
152
|
-
label: 'Is Primary',
|
|
153
|
-
type: 'boolean'
|
|
154
|
-
},
|
|
155
|
-
type: {
|
|
156
|
-
label: 'Email Type',
|
|
157
|
-
type: 'string'
|
|
158
|
-
}
|
|
159
58
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
'@path': '$.properties.email'
|
|
171
|
-
}
|
|
59
|
+
city: {
|
|
60
|
+
'@if': {
|
|
61
|
+
exists: {
|
|
62
|
+
'@path': '$.traits.address.city'
|
|
63
|
+
},
|
|
64
|
+
then: {
|
|
65
|
+
'@path': '$.traits.address.city'
|
|
66
|
+
},
|
|
67
|
+
else: {
|
|
68
|
+
'@path': '$.properties.address.city'
|
|
172
69
|
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
type: ''
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
first: {
|
|
180
|
-
label: 'First Name',
|
|
181
|
-
description: "The constituent's first name up to 50 characters.",
|
|
182
|
-
type: 'string',
|
|
183
|
-
default: {
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
country: {
|
|
184
73
|
'@if': {
|
|
185
74
|
exists: {
|
|
186
|
-
'@path': '$.traits.
|
|
75
|
+
'@path': '$.traits.address.country'
|
|
187
76
|
},
|
|
188
77
|
then: {
|
|
189
|
-
'@path': '$.traits.
|
|
78
|
+
'@path': '$.traits.address.country'
|
|
190
79
|
},
|
|
191
80
|
else: {
|
|
192
|
-
'@path': '$.properties.
|
|
81
|
+
'@path': '$.properties.address.country'
|
|
193
82
|
}
|
|
194
83
|
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
label: 'Gender',
|
|
199
|
-
description: "The constituent's gender.",
|
|
200
|
-
type: 'string',
|
|
201
|
-
default: {
|
|
84
|
+
},
|
|
85
|
+
do_not_mail: '',
|
|
86
|
+
postal_code: {
|
|
202
87
|
'@if': {
|
|
203
88
|
exists: {
|
|
204
|
-
'@path': '$.traits.
|
|
89
|
+
'@path': '$.traits.address.postalCode'
|
|
205
90
|
},
|
|
206
91
|
then: {
|
|
207
|
-
'@path': '$.traits.
|
|
92
|
+
'@path': '$.traits.address.postalCode'
|
|
208
93
|
},
|
|
209
94
|
else: {
|
|
210
|
-
'@path': '$.properties.
|
|
95
|
+
'@path': '$.properties.address.postalCode'
|
|
211
96
|
}
|
|
212
97
|
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
label: 'Income',
|
|
217
|
-
description: "The constituent's income.",
|
|
218
|
-
type: 'string'
|
|
219
|
-
},
|
|
220
|
-
last: {
|
|
221
|
-
label: 'Last Name',
|
|
222
|
-
description: "The constituent's last name up to 100 characters. This is required to create a constituent.",
|
|
223
|
-
type: 'string',
|
|
224
|
-
default: {
|
|
98
|
+
},
|
|
99
|
+
primary: '',
|
|
100
|
+
state: {
|
|
225
101
|
'@if': {
|
|
226
102
|
exists: {
|
|
227
|
-
'@path': '$.traits.
|
|
103
|
+
'@path': '$.traits.address.state'
|
|
228
104
|
},
|
|
229
105
|
then: {
|
|
230
|
-
'@path': '$.traits.
|
|
106
|
+
'@path': '$.traits.address.state'
|
|
231
107
|
},
|
|
232
108
|
else: {
|
|
233
|
-
'@path': '$.properties.
|
|
109
|
+
'@path': '$.properties.address.state'
|
|
234
110
|
}
|
|
235
111
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
properties: {
|
|
249
|
-
address: {
|
|
250
|
-
label: 'Web Address',
|
|
251
|
-
type: 'string'
|
|
112
|
+
},
|
|
113
|
+
type: ''
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
birthdate: {
|
|
117
|
+
label: 'Birthdate',
|
|
118
|
+
description: "The constituent's birthdate.",
|
|
119
|
+
type: 'datetime',
|
|
120
|
+
default: {
|
|
121
|
+
'@if': {
|
|
122
|
+
exists: {
|
|
123
|
+
'@path': '$.traits.birthday'
|
|
252
124
|
},
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
type: 'boolean'
|
|
125
|
+
then: {
|
|
126
|
+
'@path': '$.traits.birthday'
|
|
256
127
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
type: 'string'
|
|
128
|
+
else: {
|
|
129
|
+
'@path': '$.properties.birthday'
|
|
260
130
|
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
constituent_id: {
|
|
135
|
+
label: 'Constituent ID',
|
|
136
|
+
description: 'The ID of the constituent.',
|
|
137
|
+
type: 'string'
|
|
138
|
+
},
|
|
139
|
+
email: {
|
|
140
|
+
label: 'Email',
|
|
141
|
+
description: "The constituent's email address.",
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
address: {
|
|
145
|
+
label: 'Email Address',
|
|
146
|
+
type: 'string'
|
|
261
147
|
},
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
primary: '',
|
|
277
|
-
type: ''
|
|
148
|
+
do_not_email: {
|
|
149
|
+
label: 'Do Not Email',
|
|
150
|
+
type: 'boolean'
|
|
151
|
+
},
|
|
152
|
+
primary: {
|
|
153
|
+
label: 'Is Primary',
|
|
154
|
+
type: 'boolean'
|
|
155
|
+
},
|
|
156
|
+
type: {
|
|
157
|
+
label: 'Email Type',
|
|
158
|
+
type: 'string'
|
|
278
159
|
}
|
|
279
160
|
},
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
},
|
|
293
|
-
primary: {
|
|
294
|
-
label: 'Is Primary',
|
|
295
|
-
type: 'boolean'
|
|
296
|
-
},
|
|
297
|
-
type: {
|
|
298
|
-
label: 'Phone Type',
|
|
299
|
-
type: 'string'
|
|
161
|
+
default: {
|
|
162
|
+
address: {
|
|
163
|
+
'@if': {
|
|
164
|
+
exists: {
|
|
165
|
+
'@path': '$.traits.email'
|
|
166
|
+
},
|
|
167
|
+
then: {
|
|
168
|
+
'@path': '$.traits.email'
|
|
169
|
+
},
|
|
170
|
+
else: {
|
|
171
|
+
'@path': '$.properties.email'
|
|
172
|
+
}
|
|
300
173
|
}
|
|
301
174
|
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
'@if': {
|
|
306
|
-
exists: {
|
|
307
|
-
'@path': '$.traits.phone'
|
|
308
|
-
},
|
|
309
|
-
then: {
|
|
310
|
-
'@path': '$.traits.phone'
|
|
311
|
-
},
|
|
312
|
-
else: {
|
|
313
|
-
'@path': '$.properties.phone'
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
primary: '',
|
|
318
|
-
type: ''
|
|
319
|
-
}
|
|
175
|
+
do_not_email: '',
|
|
176
|
+
primary: '',
|
|
177
|
+
type: ''
|
|
320
178
|
}
|
|
321
179
|
},
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
else if (constituentSearchResults.count === 1) {
|
|
338
|
-
constituentId = constituentSearchResults.value[0].id;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
const constituentData = {
|
|
342
|
-
first: payload.first,
|
|
343
|
-
gender: payload.gender,
|
|
344
|
-
income: payload.income,
|
|
345
|
-
last: payload.last,
|
|
346
|
-
lookup_id: payload.lookup_id
|
|
347
|
-
};
|
|
348
|
-
Object.keys(constituentData).forEach((key) => {
|
|
349
|
-
if (!constituentData[key]) {
|
|
350
|
-
delete constituentData[key];
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
if (payload.birthdate) {
|
|
354
|
-
const birthdateFuzzyDate = utils_1.dateStringToFuzzyDate(payload.birthdate);
|
|
355
|
-
if (birthdateFuzzyDate) {
|
|
356
|
-
constituentData.birthdate = birthdateFuzzyDate;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
let constituentAddressData = {};
|
|
360
|
-
if (payload.address &&
|
|
361
|
-
(payload.address.address_lines ||
|
|
362
|
-
payload.address.city ||
|
|
363
|
-
payload.address.country ||
|
|
364
|
-
payload.address.postal_code ||
|
|
365
|
-
payload.address.state) &&
|
|
366
|
-
payload.address.type) {
|
|
367
|
-
constituentAddressData = payload.address;
|
|
368
|
-
}
|
|
369
|
-
let constituentEmailData = {};
|
|
370
|
-
if (payload.email && payload.email.address && payload.email.type) {
|
|
371
|
-
constituentEmailData = payload.email;
|
|
372
|
-
}
|
|
373
|
-
let constituentOnlinePresenceData = {};
|
|
374
|
-
if (payload.online_presence && payload.online_presence.address && payload.online_presence.type) {
|
|
375
|
-
constituentOnlinePresenceData = payload.online_presence;
|
|
376
|
-
}
|
|
377
|
-
let constituentPhoneData = {};
|
|
378
|
-
if (payload.phone && payload.phone.number && payload.phone.type) {
|
|
379
|
-
constituentPhoneData = payload.phone;
|
|
380
|
-
}
|
|
381
|
-
if (!constituentId) {
|
|
382
|
-
constituentData.type = 'Individual';
|
|
383
|
-
if (!constituentData.last) {
|
|
384
|
-
throw new actions_core_1.IntegrationError('Missing last name value', 'MISSING_REQUIRED_FIELD', 400);
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
if (Object.keys(constituentAddressData).length > 0) {
|
|
388
|
-
constituentData.address = constituentAddressData;
|
|
389
|
-
}
|
|
390
|
-
if (Object.keys(constituentEmailData).length > 0) {
|
|
391
|
-
constituentData.email = constituentEmailData;
|
|
392
|
-
}
|
|
393
|
-
if (Object.keys(constituentOnlinePresenceData).length > 0) {
|
|
394
|
-
constituentData.online_presence = constituentOnlinePresenceData;
|
|
395
|
-
}
|
|
396
|
-
if (Object.keys(constituentPhoneData).length > 0) {
|
|
397
|
-
constituentData.phone = constituentPhoneData;
|
|
180
|
+
first: {
|
|
181
|
+
label: 'First Name',
|
|
182
|
+
description: "The constituent's first name up to 50 characters.",
|
|
183
|
+
type: 'string',
|
|
184
|
+
default: {
|
|
185
|
+
'@if': {
|
|
186
|
+
exists: {
|
|
187
|
+
'@path': '$.traits.firstName'
|
|
188
|
+
},
|
|
189
|
+
then: {
|
|
190
|
+
'@path': '$.traits.firstName'
|
|
191
|
+
},
|
|
192
|
+
else: {
|
|
193
|
+
'@path': '$.properties.firstName'
|
|
398
194
|
}
|
|
399
|
-
await blackbaudSkyApiClient.createConstituent(constituentData);
|
|
400
195
|
}
|
|
401
|
-
return;
|
|
402
196
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
197
|
+
},
|
|
198
|
+
gender: {
|
|
199
|
+
label: 'Gender',
|
|
200
|
+
description: "The constituent's gender.",
|
|
201
|
+
type: 'string',
|
|
202
|
+
default: {
|
|
203
|
+
'@if': {
|
|
204
|
+
exists: {
|
|
205
|
+
'@path': '$.traits.gender'
|
|
206
|
+
},
|
|
207
|
+
then: {
|
|
208
|
+
'@path': '$.traits.gender'
|
|
209
|
+
},
|
|
210
|
+
else: {
|
|
211
|
+
'@path': '$.properties.gender'
|
|
418
212
|
}
|
|
419
213
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
else {
|
|
442
|
-
if (existingAddress.inactive ||
|
|
443
|
-
(constituentAddressData.do_not_mail !== undefined &&
|
|
444
|
-
constituentAddressData.do_not_mail !== existingAddress.do_not_mail) ||
|
|
445
|
-
(constituentAddressData.primary !== undefined &&
|
|
446
|
-
constituentAddressData.primary &&
|
|
447
|
-
constituentAddressData.primary !== existingAddress.primary) ||
|
|
448
|
-
constituentAddressData.type !== existingAddress.type) {
|
|
449
|
-
const updateConstituentAddressByIdResponse = await blackbaudSkyApiClient.updateConstituentAddressById(existingAddress.id, constituentAddressData);
|
|
450
|
-
if (updateConstituentAddressByIdResponse.status !== 200) {
|
|
451
|
-
updateAddressErrorCode = updateConstituentAddressByIdResponse.status;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
if (updateAddressErrorCode) {
|
|
457
|
-
const errorMessage = updateAddressErrorCode
|
|
458
|
-
? `${updateAddressErrorCode} error occurred when updating constituent address`
|
|
459
|
-
: 'Error occurred when updating constituent address';
|
|
460
|
-
if (utils_1.isRequestErrorRetryable(updateAddressErrorCode)) {
|
|
461
|
-
throw new actions_core_1.RetryableError(errorMessage);
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
integrationErrors.push(errorMessage);
|
|
465
|
-
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
income: {
|
|
217
|
+
label: 'Income',
|
|
218
|
+
description: "The constituent's income.",
|
|
219
|
+
type: 'string'
|
|
220
|
+
},
|
|
221
|
+
last: {
|
|
222
|
+
label: 'Last Name',
|
|
223
|
+
description: "The constituent's last name up to 100 characters. This is required to create a constituent.",
|
|
224
|
+
type: 'string',
|
|
225
|
+
default: {
|
|
226
|
+
'@if': {
|
|
227
|
+
exists: {
|
|
228
|
+
'@path': '$.traits.lastName'
|
|
229
|
+
},
|
|
230
|
+
then: {
|
|
231
|
+
'@path': '$.traits.lastName'
|
|
232
|
+
},
|
|
233
|
+
else: {
|
|
234
|
+
'@path': '$.properties.lastName'
|
|
466
235
|
}
|
|
467
236
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
else {
|
|
492
|
-
if (existingEmail.inactive ||
|
|
493
|
-
(constituentEmailData.do_not_email !== undefined &&
|
|
494
|
-
constituentEmailData.do_not_email !== existingEmail.do_not_email) ||
|
|
495
|
-
(constituentEmailData.primary !== undefined &&
|
|
496
|
-
constituentEmailData.primary &&
|
|
497
|
-
constituentEmailData.primary !== existingEmail.primary) ||
|
|
498
|
-
constituentEmailData.type !== existingEmail.type) {
|
|
499
|
-
const updateConstituentEmailByIdResponse = await blackbaudSkyApiClient.updateConstituentEmailById(existingEmail.id, constituentEmailData);
|
|
500
|
-
if (updateConstituentEmailByIdResponse.status !== 200) {
|
|
501
|
-
updateEmailErrorCode = updateConstituentEmailByIdResponse.status;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
if (updateEmailErrorCode) {
|
|
507
|
-
const errorMessage = updateEmailErrorCode
|
|
508
|
-
? `${updateEmailErrorCode} error occurred when updating constituent email`
|
|
509
|
-
: 'Error occurred when updating constituent email';
|
|
510
|
-
if (utils_1.isRequestErrorRetryable(updateEmailErrorCode)) {
|
|
511
|
-
throw new actions_core_1.RetryableError(errorMessage);
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
514
|
-
integrationErrors.push(errorMessage);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
lookup_id: {
|
|
240
|
+
label: 'Lookup ID',
|
|
241
|
+
description: 'The organization-defined identifier for the constituent.',
|
|
242
|
+
type: 'string'
|
|
243
|
+
},
|
|
244
|
+
online_presence: {
|
|
245
|
+
label: 'Online Presence',
|
|
246
|
+
description: "The constituent's online presence.",
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {
|
|
249
|
+
address: {
|
|
250
|
+
label: 'Web Address',
|
|
251
|
+
type: 'string'
|
|
252
|
+
},
|
|
253
|
+
primary: {
|
|
254
|
+
label: 'Is Primary',
|
|
255
|
+
type: 'boolean'
|
|
256
|
+
},
|
|
257
|
+
type: {
|
|
258
|
+
label: 'Online Presence Type',
|
|
259
|
+
type: 'string'
|
|
517
260
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
if
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
if (!existingOnlinePresence) {
|
|
531
|
-
if (constituentOnlinePresenceData.primary !== false && constituentOnlinePresenceListResults.count === 0) {
|
|
532
|
-
constituentOnlinePresenceData.primary = true;
|
|
533
|
-
}
|
|
534
|
-
const createConstituentOnlinePresenceResponse = await blackbaudSkyApiClient.createConstituentOnlinePresence(constituentId, constituentOnlinePresenceData);
|
|
535
|
-
if (createConstituentOnlinePresenceResponse.status !== 200) {
|
|
536
|
-
updateOnlinePresenceErrorCode = createConstituentOnlinePresenceResponse.status;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
else {
|
|
540
|
-
if (existingOnlinePresence.inactive ||
|
|
541
|
-
(constituentOnlinePresenceData.primary !== undefined &&
|
|
542
|
-
constituentOnlinePresenceData.primary !== existingOnlinePresence.primary) ||
|
|
543
|
-
constituentOnlinePresenceData.type !== existingOnlinePresence.type) {
|
|
544
|
-
const updateConstituentOnlinePresenceByIdResponse = await blackbaudSkyApiClient.updateConstituentOnlinePresenceById(existingOnlinePresence.id, constituentOnlinePresenceData);
|
|
545
|
-
if (updateConstituentOnlinePresenceByIdResponse.status !== 200) {
|
|
546
|
-
updateOnlinePresenceErrorCode = updateConstituentOnlinePresenceByIdResponse.status;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
if (updateOnlinePresenceErrorCode) {
|
|
552
|
-
const errorMessage = updateOnlinePresenceErrorCode
|
|
553
|
-
? `${updateOnlinePresenceErrorCode} error occurred when updating constituent online presence`
|
|
554
|
-
: 'Error occurred when updating constituent online presence';
|
|
555
|
-
if (utils_1.isRequestErrorRetryable(updateOnlinePresenceErrorCode)) {
|
|
556
|
-
throw new actions_core_1.RetryableError(errorMessage);
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
integrationErrors.push(errorMessage);
|
|
261
|
+
},
|
|
262
|
+
default: {
|
|
263
|
+
address: {
|
|
264
|
+
'@if': {
|
|
265
|
+
exists: {
|
|
266
|
+
'@path': '$.traits.website'
|
|
267
|
+
},
|
|
268
|
+
then: {
|
|
269
|
+
'@path': '$.traits.website'
|
|
270
|
+
},
|
|
271
|
+
else: {
|
|
272
|
+
'@path': '$.properties.website'
|
|
560
273
|
}
|
|
561
274
|
}
|
|
275
|
+
},
|
|
276
|
+
primary: '',
|
|
277
|
+
type: ''
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
phone: {
|
|
281
|
+
label: 'Phone',
|
|
282
|
+
description: "The constituent's phone number.",
|
|
283
|
+
type: 'object',
|
|
284
|
+
properties: {
|
|
285
|
+
do_not_call: {
|
|
286
|
+
label: 'Do Not Call',
|
|
287
|
+
type: 'boolean'
|
|
288
|
+
},
|
|
289
|
+
number: {
|
|
290
|
+
label: 'Phone Number',
|
|
291
|
+
type: 'string'
|
|
292
|
+
},
|
|
293
|
+
primary: {
|
|
294
|
+
label: 'Is Primary',
|
|
295
|
+
type: 'boolean'
|
|
296
|
+
},
|
|
297
|
+
type: {
|
|
298
|
+
label: 'Phone Type',
|
|
299
|
+
type: 'string'
|
|
562
300
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
}
|
|
577
|
-
if (!existingPhone) {
|
|
578
|
-
if (constituentPhoneData.primary !== false && constituentPhoneListResults.count === 0) {
|
|
579
|
-
constituentPhoneData.primary = true;
|
|
580
|
-
}
|
|
581
|
-
const createConstituentPhoneResponse = await blackbaudSkyApiClient.createConstituentPhone(constituentId, constituentPhoneData);
|
|
582
|
-
if (createConstituentPhoneResponse.status !== 200) {
|
|
583
|
-
updatePhoneErrorCode = createConstituentPhoneResponse.status;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
587
|
-
if (existingPhone.inactive ||
|
|
588
|
-
(constituentPhoneData.do_not_call !== undefined &&
|
|
589
|
-
constituentPhoneData.do_not_call !== existingPhone.do_not_call) ||
|
|
590
|
-
(constituentPhoneData.primary !== undefined && constituentPhoneData.primary !== existingPhone.primary) ||
|
|
591
|
-
constituentPhoneData.type !== existingPhone.type) {
|
|
592
|
-
const updateConstituentPhoneByIdResponse = await blackbaudSkyApiClient.updateConstituentPhoneById(existingPhone.id, constituentPhoneData);
|
|
593
|
-
if (updateConstituentPhoneByIdResponse.status !== 200) {
|
|
594
|
-
updatePhoneErrorCode = updateConstituentPhoneByIdResponse.status;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
if (updatePhoneErrorCode) {
|
|
600
|
-
const errorMessage = updatePhoneErrorCode
|
|
601
|
-
? `${updatePhoneErrorCode} error occurred when updating constituent online presence`
|
|
602
|
-
: 'Error occurred when updating constituent online presence';
|
|
603
|
-
if (utils_1.isRequestErrorRetryable(updatePhoneErrorCode)) {
|
|
604
|
-
throw new actions_core_1.RetryableError(errorMessage);
|
|
605
|
-
}
|
|
606
|
-
else {
|
|
607
|
-
integrationErrors.push(errorMessage);
|
|
301
|
+
},
|
|
302
|
+
default: {
|
|
303
|
+
do_not_call: '',
|
|
304
|
+
number: {
|
|
305
|
+
'@if': {
|
|
306
|
+
exists: {
|
|
307
|
+
'@path': '$.traits.phone'
|
|
308
|
+
},
|
|
309
|
+
then: {
|
|
310
|
+
'@path': '$.traits.phone'
|
|
311
|
+
},
|
|
312
|
+
else: {
|
|
313
|
+
'@path': '$.properties.phone'
|
|
608
314
|
}
|
|
609
315
|
}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
return;
|
|
316
|
+
},
|
|
317
|
+
primary: '',
|
|
318
|
+
type: ''
|
|
615
319
|
}
|
|
616
320
|
}
|
|
617
321
|
};
|
|
322
|
+
const perform = async (request, { payload }) => {
|
|
323
|
+
const blackbaudSkyApiClient = new api_1.BlackbaudSkyApi(request);
|
|
324
|
+
let constituentId = payload.constituent_id;
|
|
325
|
+
if (!constituentId && (payload.email?.address || payload.lookup_id)) {
|
|
326
|
+
const getExistingConstituentResponse = await blackbaudSkyApiClient.getExistingConstituent(payload.email, payload.lookup_id);
|
|
327
|
+
constituentId = getExistingConstituentResponse.id;
|
|
328
|
+
}
|
|
329
|
+
const [constituentData, addressData, emailData, onlinePresenceData, phoneData] = utils_1.splitConstituentPayload(payload);
|
|
330
|
+
if (!constituentId) {
|
|
331
|
+
return blackbaudSkyApiClient.createConstituentWithRelatedObjects(constituentData, addressData, emailData, onlinePresenceData, phoneData);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
return blackbaudSkyApiClient.updateConstituentWithRelatedObjects(constituentId, constituentData, addressData, emailData, onlinePresenceData, phoneData);
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
exports.perform = perform;
|
|
338
|
+
const action = {
|
|
339
|
+
title: 'Create or Update Individual Constituent',
|
|
340
|
+
description: "Create or update an Individual Constituent record in Raiser's Edge NXT.",
|
|
341
|
+
defaultSubscription: 'type = "identify"',
|
|
342
|
+
fields: exports.fields,
|
|
343
|
+
perform: exports.perform
|
|
344
|
+
};
|
|
618
345
|
exports.default = action;
|
|
619
346
|
//# sourceMappingURL=index.js.map
|