@segment/action-destinations 3.312.0 → 3.312.1-staging-1989539c2
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/actions-pardot/prospects/index.js +1 -2
- package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
- package/dist/destinations/amazon-amc/syncAudiencesToDSP/index.js +49 -29
- package/dist/destinations/amazon-amc/syncAudiencesToDSP/index.js.map +1 -1
- package/dist/destinations/contentstack/customAttributesSync/generated-types.d.ts +7 -0
- package/dist/destinations/contentstack/customAttributesSync/generated-types.js +3 -0
- package/dist/destinations/contentstack/customAttributesSync/generated-types.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/index.d.ts +5 -0
- package/dist/destinations/contentstack/customAttributesSync/index.js +54 -0
- package/dist/destinations/contentstack/customAttributesSync/index.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/types.d.ts +14 -0
- package/dist/destinations/contentstack/customAttributesSync/types.js +3 -0
- package/dist/destinations/contentstack/customAttributesSync/types.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +4 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.js +20 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.js.map +1 -0
- package/dist/destinations/contentstack/types.d.ts +12 -0
- package/dist/destinations/contentstack/types.js +3 -0
- package/dist/destinations/contentstack/types.js.map +1 -0
- package/dist/destinations/customerio/utils.d.ts +1 -1
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
- package/dist/destinations/engage/sendgrid/index.js +5 -0
- package/dist/destinations/engage/sendgrid/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +419 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/index.js +5 -0
- package/dist/destinations/engage/twilio/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +28 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +151 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/utils/index.js +15 -0
- package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
- package/dist/destinations/engage/twilio/utils/types.js +3 -0
- package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
- package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
- package/dist/destinations/engage/utils/AggregateError.js +26 -0
- package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js +148 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageLogger.js +52 -0
- package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
- package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageStats.js +95 -0
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/Profile.d.ts +6 -0
- package/dist/destinations/engage/utils/Profile.js +3 -0
- package/dist/destinations/engage/utils/Profile.js.map +1 -0
- package/dist/destinations/engage/utils/ResponseError.d.ts +25 -0
- package/dist/destinations/engage/utils/ResponseError.js +22 -0
- package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
- package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
- package/dist/destinations/engage/utils/apiLookups.js +189 -0
- package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
- package/dist/destinations/engage/utils/index.d.ts +9 -0
- package/dist/destinations/engage/utils/index.js +22 -0
- package/dist/destinations/engage/utils/index.js.map +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
- package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
- package/dist/destinations/engage/utils/isRetryableError.js +33 -0
- package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
- package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
- package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
- package/dist/destinations/engage/utils/testUtils.js +26 -0
- package/dist/destinations/engage/utils/testUtils.js.map +1 -0
- package/dist/destinations/engage/utils/track.d.ts +52 -0
- package/dist/destinations/engage/utils/track.js +9 -0
- package/dist/destinations/engage/utils/track.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.d.ts +3 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js +9 -9
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.d.ts +2 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js +11 -3
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.d.ts +67 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js +108 -0
- package/dist/destinations/facebook-conversions-api/addToCart2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.d.ts +57 -0
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/custom2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/custom2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/custom2/index.js +72 -0
- package/dist/destinations/facebook-conversions-api/custom2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +15 -1
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.d.ts +67 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +111 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.d.ts +56 -0
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/pageView2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/pageView2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/pageView2/index.js +66 -0
- package/dist/destinations/facebook-conversions-api/pageView2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.d.ts +68 -0
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/purchase2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/purchase2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/purchase2/index.js +114 -0
- package/dist/destinations/facebook-conversions-api/purchase2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.d.ts +67 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/search2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/search2/index.js +115 -0
- package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.d.ts +68 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js +110 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js.map +1 -0
- package/dist/destinations/first-party-dv360/functions.d.ts +17 -0
- package/dist/destinations/first-party-dv360/functions.js +38 -0
- package/dist/destinations/first-party-dv360/functions.js.map +1 -0
- package/dist/destinations/google-sheets/constants.d.ts +1 -0
- package/dist/destinations/google-sheets/constants.js +2 -1
- package/dist/destinations/google-sheets/constants.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/generated-types.d.ts +1 -0
- package/dist/destinations/google-sheets/postSheet/index.js +25 -9
- package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet/operations.d.ts +3 -1
- package/dist/destinations/google-sheets/postSheet/operations.js +5 -4
- package/dist/destinations/google-sheets/postSheet/operations.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet2/index.js +20 -4
- package/dist/destinations/google-sheets/postSheet2/index.js.map +1 -1
- package/dist/destinations/google-sheets/postSheet2/operations2.d.ts +3 -1
- package/dist/destinations/google-sheets/postSheet2/operations2.js +6 -5
- package/dist/destinations/google-sheets/postSheet2/operations2.js.map +1 -1
- package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js +305 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
- package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +219 -0
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js +609 -0
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -0
- package/dist/destinations/linkedin-conversions/index.js +18 -0
- package/dist/destinations/linkedin-conversions/index.js.map +1 -1
- package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
- package/dist/destinations/mappings-two-test/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/index.d.ts +4 -0
- package/dist/destinations/mappings-two-test/index.js +34 -0
- package/dist/destinations/mappings-two-test/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.d.ts +29 -0
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/inputMethods/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/inputMethods/index.d.ts +5 -0
- package/dist/destinations/mappings-two-test/inputMethods/index.js +200 -0
- package/dist/destinations/mappings-two-test/inputMethods/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +53 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +5 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.js +289 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +17 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +5 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.js +345 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
- package/dist/destinations/salesforce/account2/generated-types.d.ts +32 -0
- package/dist/destinations/salesforce/account2/generated-types.js +3 -0
- package/dist/destinations/salesforce/account2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/account2/index.d.ts +5 -0
- package/dist/destinations/salesforce/account2/index.js +248 -0
- package/dist/destinations/salesforce/account2/index.js.map +1 -0
- package/dist/destinations/salesforce/cases2/generated-types.d.ts +17 -0
- package/dist/destinations/salesforce/cases2/generated-types.js +3 -0
- package/dist/destinations/salesforce/cases2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/cases2/index.d.ts +5 -0
- package/dist/destinations/salesforce/cases2/index.js +76 -0
- package/dist/destinations/salesforce/cases2/index.js.map +1 -0
- package/dist/destinations/salesforce/contact2/generated-types.d.ts +25 -0
- package/dist/destinations/salesforce/contact2/generated-types.js +3 -0
- package/dist/destinations/salesforce/contact2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/contact2/index.d.ts +5 -0
- package/dist/destinations/salesforce/contact2/index.js +192 -0
- package/dist/destinations/salesforce/contact2/index.js.map +1 -0
- package/dist/destinations/salesforce/customObject2/generated-types.d.ts +17 -0
- package/dist/destinations/salesforce/customObject2/generated-types.js +3 -0
- package/dist/destinations/salesforce/customObject2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/customObject2/index.d.ts +5 -0
- package/dist/destinations/salesforce/customObject2/index.js +97 -0
- package/dist/destinations/salesforce/customObject2/index.js.map +1 -0
- package/dist/destinations/salesforce/index.js +3 -1
- package/dist/destinations/salesforce/index.js.map +1 -1
- package/dist/destinations/salesforce/lead2/generated-types.d.ts +25 -0
- package/dist/destinations/salesforce/lead2/generated-types.js +3 -0
- package/dist/destinations/salesforce/lead2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/lead2/index.d.ts +5 -0
- package/dist/destinations/salesforce/lead2/index.js +200 -0
- package/dist/destinations/salesforce/lead2/index.js.map +1 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +21 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.js +3 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/opportunity2/index.d.ts +5 -0
- package/dist/destinations/salesforce/opportunity2/index.js +112 -0
- package/dist/destinations/salesforce/opportunity2/index.js.map +1 -0
- package/dist/destinations/salesforce/sf-operations.d.ts +1 -0
- package/dist/destinations/salesforce/sf-operations.js +20 -0
- package/dist/destinations/salesforce/sf-operations.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +1 -0
- package/dist/destinations/salesforce/sf-properties.js +40 -6
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/webhook/send/index.js +3 -1
- package/dist/destinations/webhook/send/index.js.map +1 -1
- package/dist/destinations/webhook-extensible/generated-types.d.ts +4 -0
- package/dist/destinations/webhook-extensible/index.js +49 -4
- package/dist/destinations/webhook-extensible/index.js.map +1 -1
- package/dist/destinations/webhook-extensible/send/index.js +2 -2
- package/dist/destinations/webhook-extensible/send/index.js.map +1 -1
- package/dist/destinations/webhook-extensible/types.d.ts +6 -0
- package/dist/destinations/webhook-extensible/types.js +3 -0
- package/dist/destinations/webhook-extensible/types.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
6
|
+
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Initiate Checkout',
|
|
11
|
+
description: 'Send event when a user enters the checkout flow',
|
|
12
|
+
defaultSubscription: 'type = "track" and event = "Checkout Started"',
|
|
13
|
+
syncMode: {
|
|
14
|
+
description: 'Define how the records from your destination will be synced.',
|
|
15
|
+
label: 'How to sync records',
|
|
16
|
+
default: 'add',
|
|
17
|
+
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
18
|
+
},
|
|
19
|
+
fields: {
|
|
20
|
+
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
21
|
+
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
22
|
+
user_data: fb_capi_user_data_1.user_data_field,
|
|
23
|
+
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
24
|
+
content_category: fb_capi_properties_1.content_category,
|
|
25
|
+
content_ids: fb_capi_properties_1.content_ids,
|
|
26
|
+
contents: {
|
|
27
|
+
...fb_capi_properties_1.contents,
|
|
28
|
+
default: {
|
|
29
|
+
'@arrayPath': [
|
|
30
|
+
'$.properties.products',
|
|
31
|
+
{
|
|
32
|
+
id: {
|
|
33
|
+
'@path': '$.product_id'
|
|
34
|
+
},
|
|
35
|
+
quantity: {
|
|
36
|
+
'@path': '$.quantity'
|
|
37
|
+
},
|
|
38
|
+
item_price: {
|
|
39
|
+
'@path': '$.price'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
currency: fb_capi_properties_1.currency,
|
|
46
|
+
event_id: fb_capi_properties_1.event_id,
|
|
47
|
+
event_source_url: fb_capi_properties_1.event_source_url,
|
|
48
|
+
num_items: fb_capi_properties_1.num_items,
|
|
49
|
+
value: {
|
|
50
|
+
...fb_capi_properties_1.value,
|
|
51
|
+
default: { '@path': '$.properties.revenue' }
|
|
52
|
+
},
|
|
53
|
+
custom_data: fb_capi_properties_1.custom_data,
|
|
54
|
+
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
55
|
+
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
56
|
+
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
57
|
+
},
|
|
58
|
+
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
59
|
+
if (syncMode === 'add') {
|
|
60
|
+
if (payload.currency && !constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
61
|
+
throw new actions_core_1.IntegrationError(`${payload.currency} is not a valid currency code.`, 'Misconfigured required field', 400);
|
|
62
|
+
}
|
|
63
|
+
if (!payload.user_data) {
|
|
64
|
+
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
65
|
+
}
|
|
66
|
+
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
67
|
+
throw new actions_core_1.IntegrationError('If action source is "Website" then client_user_agent must be defined', 'Misconfigured required field', 400);
|
|
68
|
+
}
|
|
69
|
+
if (payload.contents) {
|
|
70
|
+
const err = fb_capi_properties_1.validateContents(payload.contents);
|
|
71
|
+
if (err)
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
74
|
+
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
75
|
+
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
76
|
+
method: 'POST',
|
|
77
|
+
json: {
|
|
78
|
+
data: [
|
|
79
|
+
{
|
|
80
|
+
event_name: 'InitiateCheckout',
|
|
81
|
+
event_time: payload.event_time,
|
|
82
|
+
action_source: payload.action_source,
|
|
83
|
+
event_source_url: payload.event_source_url,
|
|
84
|
+
event_id: payload.event_id,
|
|
85
|
+
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
86
|
+
custom_data: {
|
|
87
|
+
...payload.custom_data,
|
|
88
|
+
currency: payload.currency,
|
|
89
|
+
value: payload.value,
|
|
90
|
+
content_ids: payload.content_ids,
|
|
91
|
+
contents: payload.contents,
|
|
92
|
+
num_items: payload.num_items,
|
|
93
|
+
content_category: payload.content_category
|
|
94
|
+
},
|
|
95
|
+
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
96
|
+
data_processing_options: data_options,
|
|
97
|
+
data_processing_options_country: country_code,
|
|
98
|
+
data_processing_options_state: state_code
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
exports.default = action;
|
|
111
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/initiateCheckout2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAG1E,4CAAiD;AACjD,8DAiB8B;AAC9B,4DAAsE;AAC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AgB,EAAE,OAAO,CAAC,gBAAgB;4BAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;4BAC3D,WAAW,EAAE;gCACX,GAAG,OAAO,CAAC,WAAW;gCACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gCAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;gCACpB,WAAW,EAAE,OAAO,CAAC,WAAW;gCAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;gCAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;gCAC5B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;6BAC3C;4BACD,QAAQ,EAAE,oCAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;4BACnD,uBAAuB,EAAE,YAAY;4BACrC,+BAA+B,EAAE,YAAY;4BAC7C,6BAA6B,EAAE,UAAU;yBAC1C;qBACF;oBACD,GAAG,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;iBAC3E;aACF,CACF,CAAA;SACF;aAAM;YACL,MAAM,IAAI,+BAAgB,CAAC,aAAa,QAAQ,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
action_source: string;
|
|
3
|
+
event_time: string;
|
|
4
|
+
user_data: {
|
|
5
|
+
externalId?: string[];
|
|
6
|
+
email?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
gender?: string;
|
|
9
|
+
dateOfBirth?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
firstName?: string;
|
|
12
|
+
city?: string;
|
|
13
|
+
state?: string;
|
|
14
|
+
zip?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
client_ip_address?: string;
|
|
17
|
+
client_user_agent?: string;
|
|
18
|
+
fbc?: string;
|
|
19
|
+
fbp?: string;
|
|
20
|
+
subscriptionID?: string;
|
|
21
|
+
leadID?: number;
|
|
22
|
+
fbLoginID?: number;
|
|
23
|
+
anonId?: string;
|
|
24
|
+
partner_id?: string;
|
|
25
|
+
partner_name?: string;
|
|
26
|
+
};
|
|
27
|
+
app_data_field?: {
|
|
28
|
+
use_app_data?: boolean;
|
|
29
|
+
advertiser_tracking_enabled?: boolean;
|
|
30
|
+
application_tracking_enabled?: boolean;
|
|
31
|
+
version?: string;
|
|
32
|
+
packageName?: string;
|
|
33
|
+
shortVersion?: string;
|
|
34
|
+
longVersion?: string;
|
|
35
|
+
osVersion?: string;
|
|
36
|
+
deviceName?: string;
|
|
37
|
+
locale?: string;
|
|
38
|
+
timezone?: string;
|
|
39
|
+
carrier?: string;
|
|
40
|
+
width?: string;
|
|
41
|
+
height?: string;
|
|
42
|
+
density?: string;
|
|
43
|
+
cpuCores?: string;
|
|
44
|
+
storageSize?: string;
|
|
45
|
+
freeStorage?: string;
|
|
46
|
+
deviceTimezone?: string;
|
|
47
|
+
};
|
|
48
|
+
event_id?: string;
|
|
49
|
+
event_source_url?: string;
|
|
50
|
+
custom_data?: {
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
data_processing_options?: boolean;
|
|
54
|
+
data_processing_options_country?: number;
|
|
55
|
+
data_processing_options_state?: number;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/pageView2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
5
|
+
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
8
|
+
const action = {
|
|
9
|
+
title: 'Page View',
|
|
10
|
+
description: 'Send a page view event when a user lands on a page',
|
|
11
|
+
defaultSubscription: 'type = "page"',
|
|
12
|
+
syncMode: {
|
|
13
|
+
description: 'Define how the records from your destination will be synced.',
|
|
14
|
+
label: 'How to sync records',
|
|
15
|
+
default: 'add',
|
|
16
|
+
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
17
|
+
},
|
|
18
|
+
fields: {
|
|
19
|
+
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
20
|
+
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
21
|
+
user_data: fb_capi_user_data_1.user_data_field,
|
|
22
|
+
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
23
|
+
event_id: fb_capi_properties_1.event_id,
|
|
24
|
+
event_source_url: fb_capi_properties_1.event_source_url,
|
|
25
|
+
custom_data: fb_capi_properties_1.custom_data,
|
|
26
|
+
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
27
|
+
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
28
|
+
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
29
|
+
},
|
|
30
|
+
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
31
|
+
if (syncMode === 'add') {
|
|
32
|
+
if (!payload.user_data) {
|
|
33
|
+
throw new actions_core_1.IntegrationError('Must include at least one user data property', 'Misconfigured required field', 400);
|
|
34
|
+
}
|
|
35
|
+
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
36
|
+
throw new actions_core_1.IntegrationError('If action source is "Website" then client_user_agent must be defined', 'Misconfigured required field', 400);
|
|
37
|
+
}
|
|
38
|
+
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
39
|
+
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
json: {
|
|
42
|
+
data: [
|
|
43
|
+
{
|
|
44
|
+
event_name: 'PageView',
|
|
45
|
+
event_time: payload.event_time,
|
|
46
|
+
action_source: payload.action_source,
|
|
47
|
+
event_source_url: payload.event_source_url,
|
|
48
|
+
event_id: payload.event_id,
|
|
49
|
+
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
50
|
+
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
51
|
+
data_processing_options: data_options,
|
|
52
|
+
data_processing_options_country: country_code,
|
|
53
|
+
data_processing_options_state: state_code
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.default = action;
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/pageView2/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,8DAU8B;AAC9B,4DAAsE;AAGtE,oCAA0C;AAC1C,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,oDAAoD;IACjE,mBAAmB,EAAE,eAAe;IACpC,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC,EAAE,KAAK,EAA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;wBACJ;4BACE,UAAU,EAAE,UAAU;4BACtB,UAAU,EAAE,OAAO,CAAC,UAAU;4BAC9B,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;4BAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,SAAS,EAAE,kCAAc,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;4BAC3D,QAAQ,EAAE,oCAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;4BACnD,uBAAuB,EAAE,YAAY;4BACrC,+BAA+B,EAAE,YAAY;4BAC7C,6BAA6B,EAAE,UAAU;yBAC1C;qBACF;oBACD,GAAG,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;iBAC3E;aACF,CACF,CAAA;SACF;aAAM;YACL,MAAM,IAAI,+BAAgB,CAAC,aAAa,QAAQ,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
action_source: string;
|
|
3
|
+
currency: string;
|
|
4
|
+
event_time: string;
|
|
5
|
+
user_data: {
|
|
6
|
+
externalId?: string[];
|
|
7
|
+
email?: string;
|
|
8
|
+
phone?: string;
|
|
9
|
+
gender?: string;
|
|
10
|
+
dateOfBirth?: string;
|
|
11
|
+
lastName?: string;
|
|
12
|
+
firstName?: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
zip?: string;
|
|
16
|
+
country?: string;
|
|
17
|
+
client_ip_address?: string;
|
|
18
|
+
client_user_agent?: string;
|
|
19
|
+
fbc?: string;
|
|
20
|
+
fbp?: string;
|
|
21
|
+
subscriptionID?: string;
|
|
22
|
+
leadID?: number;
|
|
23
|
+
fbLoginID?: number;
|
|
24
|
+
anonId?: string;
|
|
25
|
+
partner_id?: string;
|
|
26
|
+
partner_name?: string;
|
|
27
|
+
};
|
|
28
|
+
app_data_field?: {
|
|
29
|
+
use_app_data?: boolean;
|
|
30
|
+
advertiser_tracking_enabled?: boolean;
|
|
31
|
+
application_tracking_enabled?: boolean;
|
|
32
|
+
version?: string;
|
|
33
|
+
packageName?: string;
|
|
34
|
+
shortVersion?: string;
|
|
35
|
+
longVersion?: string;
|
|
36
|
+
osVersion?: string;
|
|
37
|
+
deviceName?: string;
|
|
38
|
+
locale?: string;
|
|
39
|
+
timezone?: string;
|
|
40
|
+
carrier?: string;
|
|
41
|
+
width?: string;
|
|
42
|
+
height?: string;
|
|
43
|
+
density?: string;
|
|
44
|
+
cpuCores?: string;
|
|
45
|
+
storageSize?: string;
|
|
46
|
+
freeStorage?: string;
|
|
47
|
+
deviceTimezone?: string;
|
|
48
|
+
};
|
|
49
|
+
value: number;
|
|
50
|
+
content_ids?: string[];
|
|
51
|
+
content_name?: string;
|
|
52
|
+
content_type?: string;
|
|
53
|
+
contents?: {
|
|
54
|
+
id?: string;
|
|
55
|
+
quantity?: number;
|
|
56
|
+
item_price?: number;
|
|
57
|
+
delivery_category?: string;
|
|
58
|
+
}[];
|
|
59
|
+
event_id?: string;
|
|
60
|
+
event_source_url?: string;
|
|
61
|
+
num_items?: number;
|
|
62
|
+
custom_data?: {
|
|
63
|
+
[k: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
data_processing_options?: boolean;
|
|
66
|
+
data_processing_options_country?: number;
|
|
67
|
+
data_processing_options_state?: number;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const fb_capi_properties_1 = require("../fb-capi-properties");
|
|
7
|
+
const fb_capi_user_data_1 = require("../fb-capi-user-data");
|
|
8
|
+
const fb_capi_app_data_1 = require("../fb-capi-app-data");
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Purchase',
|
|
11
|
+
description: 'Send event when a user completes a purchase',
|
|
12
|
+
defaultSubscription: 'type = "track" and event = "Order Completed"',
|
|
13
|
+
syncMode: {
|
|
14
|
+
description: 'Define how the records from your destination will be synced.',
|
|
15
|
+
label: 'How to sync records',
|
|
16
|
+
default: 'add',
|
|
17
|
+
choices: [{ label: 'Insert Records', value: 'add' }]
|
|
18
|
+
},
|
|
19
|
+
fields: {
|
|
20
|
+
action_source: { ...fb_capi_properties_1.action_source, required: true },
|
|
21
|
+
currency: { ...fb_capi_properties_1.currency, required: true },
|
|
22
|
+
event_time: { ...fb_capi_properties_1.event_time, required: true },
|
|
23
|
+
user_data: fb_capi_user_data_1.user_data_field,
|
|
24
|
+
app_data_field: fb_capi_app_data_1.app_data_field,
|
|
25
|
+
value: {
|
|
26
|
+
...fb_capi_properties_1.value,
|
|
27
|
+
required: true,
|
|
28
|
+
default: { '@path': '$.properties.revenue' }
|
|
29
|
+
},
|
|
30
|
+
content_ids: fb_capi_properties_1.content_ids,
|
|
31
|
+
content_name: fb_capi_properties_1.content_name,
|
|
32
|
+
content_type: fb_capi_properties_1.content_type,
|
|
33
|
+
contents: {
|
|
34
|
+
...fb_capi_properties_1.contents,
|
|
35
|
+
default: {
|
|
36
|
+
'@arrayPath': [
|
|
37
|
+
'$.properties.products',
|
|
38
|
+
{
|
|
39
|
+
id: {
|
|
40
|
+
'@path': '$.product_id'
|
|
41
|
+
},
|
|
42
|
+
quantity: {
|
|
43
|
+
'@path': '$.quantity'
|
|
44
|
+
},
|
|
45
|
+
item_price: {
|
|
46
|
+
'@path': '$.price'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
event_id: fb_capi_properties_1.event_id,
|
|
53
|
+
event_source_url: fb_capi_properties_1.event_source_url,
|
|
54
|
+
num_items: fb_capi_properties_1.num_items,
|
|
55
|
+
custom_data: fb_capi_properties_1.custom_data,
|
|
56
|
+
data_processing_options: fb_capi_properties_1.data_processing_options,
|
|
57
|
+
data_processing_options_country: fb_capi_properties_1.data_processing_options_country,
|
|
58
|
+
data_processing_options_state: fb_capi_properties_1.data_processing_options_state
|
|
59
|
+
},
|
|
60
|
+
perform: (request, { payload, settings, features, statsContext, syncMode }) => {
|
|
61
|
+
if (syncMode === 'add') {
|
|
62
|
+
if (!constants_1.CURRENCY_ISO_CODES.has(payload.currency)) {
|
|
63
|
+
throw new actions_core_1.IntegrationError(`${payload.currency} is not a valid currency code.`, actions_core_1.ErrorCodes.INVALID_CURRENCY_CODE, 400);
|
|
64
|
+
}
|
|
65
|
+
if (!payload.user_data) {
|
|
66
|
+
throw new actions_core_1.PayloadValidationError('Must include at least one user data property');
|
|
67
|
+
}
|
|
68
|
+
if (payload.action_source === 'website' && payload.user_data.client_user_agent === undefined) {
|
|
69
|
+
throw new actions_core_1.PayloadValidationError('If action source is "Website" then client_user_agent must be defined');
|
|
70
|
+
}
|
|
71
|
+
if (payload.contents) {
|
|
72
|
+
const err = fb_capi_properties_1.validateContents(payload.contents);
|
|
73
|
+
if (err)
|
|
74
|
+
throw err;
|
|
75
|
+
}
|
|
76
|
+
const [data_options, country_code, state_code] = fb_capi_properties_1.dataProcessingOptions(payload.data_processing_options, payload.data_processing_options_country, payload.data_processing_options_state);
|
|
77
|
+
return request(`https://graph.facebook.com/v${utils_1.get_api_version(features, statsContext)}/${settings.pixelId}/events`, {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
json: {
|
|
80
|
+
data: [
|
|
81
|
+
{
|
|
82
|
+
event_name: 'Purchase',
|
|
83
|
+
event_time: payload.event_time,
|
|
84
|
+
action_source: payload.action_source,
|
|
85
|
+
event_source_url: payload.event_source_url,
|
|
86
|
+
event_id: payload.event_id,
|
|
87
|
+
user_data: fb_capi_user_data_1.hash_user_data({ user_data: payload.user_data }),
|
|
88
|
+
custom_data: {
|
|
89
|
+
...payload.custom_data,
|
|
90
|
+
currency: payload.currency,
|
|
91
|
+
value: payload.value,
|
|
92
|
+
content_ids: payload.content_ids,
|
|
93
|
+
content_name: payload.content_name,
|
|
94
|
+
content_type: payload.content_type,
|
|
95
|
+
contents: payload.contents,
|
|
96
|
+
num_items: payload.num_items
|
|
97
|
+
},
|
|
98
|
+
app_data: fb_capi_app_data_1.generate_app_data(payload.app_data_field),
|
|
99
|
+
data_processing_options: data_options,
|
|
100
|
+
data_processing_options_country: country_code,
|
|
101
|
+
data_processing_options_state: state_code
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
...(settings.testEventCode && { test_event_code: settings.testEventCode })
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
throw new actions_core_1.IntegrationError(`Sync mode ${syncMode} is not supported`, 'Misconfigured sync mode', 400);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
exports.default = action;
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/purchase2/index.ts"],"names":[],"mappings":";;AAAA,wDAA8G;AAG9G,4CAAiD;AACjD,oCAA0C;AAC1C,8DAkB8B;AAC9B,4DAAsE;AACtE,0DAAuE;AAEvE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,6CAA6C;IAC1D,mBAAmB,EAAE,8CAA8C;IACnE,QAAQ,EAAE;QACR,WAAW,EAAE,8DAA8D;QAC3E,KAAK,EAAE,qBAAqB;QAC5B,O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C,WAAW;gCACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gCAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;gCACpB,WAAW,EAAE,OAAO,CAAC,WAAW;gCAChC,YAAY,EAAE,OAAO,CAAC,YAAY;gCAClC,YAAY,EAAE,OAAO,CAAC,YAAY;gCAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ;gCAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;6BAC7B;4BACD,QAAQ,EAAE,oCAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;4BACnD,uBAAuB,EAAE,YAAY;4BACrC,+BAA+B,EAAE,YAAY;4BAC7C,6BAA6B,EAAE,UAAU;yBAC1C;qBACF;oBACD,GAAG,CAAC,QAAQ,CAAC,aAAa,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;iBAC3E;aACF,CACF,CAAA;SACF;aAAM;YACL,MAAM,IAAI,+BAAgB,CAAC,aAAa,QAAQ,mBAAmB,EAAE,yBAAyB,EAAE,GAAG,CAAC,CAAA;SACrG;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
action_source: string;
|
|
3
|
+
event_time: string;
|
|
4
|
+
user_data: {
|
|
5
|
+
externalId?: string[];
|
|
6
|
+
email?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
gender?: string;
|
|
9
|
+
dateOfBirth?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
firstName?: string;
|
|
12
|
+
city?: string;
|
|
13
|
+
state?: string;
|
|
14
|
+
zip?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
client_ip_address?: string;
|
|
17
|
+
client_user_agent?: string;
|
|
18
|
+
fbc?: string;
|
|
19
|
+
fbp?: string;
|
|
20
|
+
subscriptionID?: string;
|
|
21
|
+
leadID?: number;
|
|
22
|
+
fbLoginID?: number;
|
|
23
|
+
anonId?: string;
|
|
24
|
+
partner_id?: string;
|
|
25
|
+
partner_name?: string;
|
|
26
|
+
};
|
|
27
|
+
app_data_field?: {
|
|
28
|
+
use_app_data?: boolean;
|
|
29
|
+
advertiser_tracking_enabled?: boolean;
|
|
30
|
+
application_tracking_enabled?: boolean;
|
|
31
|
+
version?: string;
|
|
32
|
+
packageName?: string;
|
|
33
|
+
shortVersion?: string;
|
|
34
|
+
longVersion?: string;
|
|
35
|
+
osVersion?: string;
|
|
36
|
+
deviceName?: string;
|
|
37
|
+
locale?: string;
|
|
38
|
+
timezone?: string;
|
|
39
|
+
carrier?: string;
|
|
40
|
+
width?: string;
|
|
41
|
+
height?: string;
|
|
42
|
+
density?: string;
|
|
43
|
+
cpuCores?: string;
|
|
44
|
+
storageSize?: string;
|
|
45
|
+
freeStorage?: string;
|
|
46
|
+
deviceTimezone?: string;
|
|
47
|
+
};
|
|
48
|
+
content_category?: string;
|
|
49
|
+
content_ids?: string[];
|
|
50
|
+
contents?: {
|
|
51
|
+
id?: string;
|
|
52
|
+
quantity?: number;
|
|
53
|
+
item_price?: number;
|
|
54
|
+
delivery_category?: string;
|
|
55
|
+
}[];
|
|
56
|
+
currency?: string;
|
|
57
|
+
event_id?: string;
|
|
58
|
+
event_source_url?: string;
|
|
59
|
+
search_string?: string;
|
|
60
|
+
value?: number;
|
|
61
|
+
custom_data?: {
|
|
62
|
+
[k: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
data_processing_options?: boolean;
|
|
65
|
+
data_processing_options_country?: number;
|
|
66
|
+
data_processing_options_state?: number;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/facebook-conversions-api/search2/generated-types.ts"],"names":[],"mappings":""}
|