@segment/action-destinations 3.361.0 → 3.362.1-remove-abort-controller.2
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/accoil-analytics/postToAccoil/generated-types.d.ts +5 -0
- package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js +3 -0
- package/dist/destinations/accoil-analytics/postToAccoil/generated-types.js.map +1 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.d.ts +5 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.js +28 -0
- package/dist/destinations/accoil-analytics/postToAccoil/index.js.map +1 -0
- package/dist/destinations/braze/createAliasV2.types.d.ts +5 -0
- package/dist/destinations/braze/createAliasV2.types.js +3 -0
- package/dist/destinations/braze/createAliasV2.types.js.map +1 -0
- package/dist/destinations/braze/identifyUserV2.types.d.ts +8 -0
- package/dist/destinations/braze/identifyUserV2.types.js +3 -0
- package/dist/destinations/braze/identifyUserV2.types.js.map +1 -0
- package/dist/destinations/campaign-manager-360/common-fields.d.ts +3 -0
- package/dist/destinations/campaign-manager-360/common-fields.js +306 -0
- package/dist/destinations/campaign-manager-360/common-fields.js.map +1 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.d.ts +45 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.js +3 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/generated-types.js.map +1 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.d.ts +5 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.js +86 -0
- package/dist/destinations/campaign-manager-360/conversionAdjustmentUpload/index.js.map +1 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.d.ts +50 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.js +3 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/generated-types.js.map +1 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/index.d.ts +5 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/index.js +131 -0
- package/dist/destinations/campaign-manager-360/conversionUpload/index.js.map +1 -0
- package/dist/destinations/campaign-manager-360/generated-types.d.ts +5 -0
- package/dist/destinations/campaign-manager-360/generated-types.js +3 -0
- package/dist/destinations/campaign-manager-360/generated-types.js.map +1 -0
- package/dist/destinations/campaign-manager-360/index.d.ts +4 -0
- package/dist/destinations/campaign-manager-360/index.js +63 -0
- package/dist/destinations/campaign-manager-360/index.js.map +1 -0
- package/dist/destinations/campaign-manager-360/types.d.ts +116 -0
- package/dist/destinations/campaign-manager-360/types.js +23 -0
- package/dist/destinations/campaign-manager-360/types.js.map +1 -0
- package/dist/destinations/campaign-manager-360/utils.d.ts +21 -0
- package/dist/destinations/campaign-manager-360/utils.js +175 -0
- package/dist/destinations/campaign-manager-360/utils.js.map +1 -0
- 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/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
- package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
- package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
- package/dist/destinations/engage/sendgrid/Profile.js +3 -0
- package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
- 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/api-lookups.d.ts +21 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.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.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.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-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/addToList/generated-types.d.ts +2 -0
- package/dist/destinations/first-party-dv360/addToList/generated-types.js +3 -0
- package/dist/destinations/first-party-dv360/addToList/generated-types.js.map +1 -0
- package/dist/destinations/first-party-dv360/addToList/index.d.ts +5 -0
- package/dist/destinations/first-party-dv360/addToList/index.js +11 -0
- package/dist/destinations/first-party-dv360/addToList/index.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.d.ts +5 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js +112 -0
- package/dist/destinations/hubspot/customEvent/dynamic-fields.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/event-completion.d.ts +3 -0
- package/dist/destinations/hubspot/customEvent/event-completion.js +17 -0
- package/dist/destinations/hubspot/customEvent/event-completion.js.map +1 -0
- 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/customEvent/utils.d.ts +14 -0
- package/dist/destinations/hubspot/customEvent/utils.js +303 -0
- package/dist/destinations/hubspot/customEvent/utils.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/validation.d.ts +3 -0
- package/dist/destinations/hubspot/customEvent/validation.js +66 -0
- package/dist/destinations/hubspot/customEvent/validation.js.map +1 -0
- package/dist/destinations/hubspot/upsertObject/dynamic-fields.d.ts +7 -0
- package/dist/destinations/hubspot/upsertObject/dynamic-fields.js +222 -0
- package/dist/destinations/hubspot/upsertObject/dynamic-fields.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/hubspot/upsertObject/utils.d.ts +13 -0
- package/dist/destinations/hubspot/upsertObject/utils.js +547 -0
- package/dist/destinations/hubspot/upsertObject/utils.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js +62 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
- package/dist/destinations/mixpanel/incrementProperties/__test__/__snapshots__/snapshot.test.js.snap +18 -0
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/responsys/shared_properties.d.ts +3 -0
- package/dist/destinations/responsys/shared_properties.js +19 -0
- package/dist/destinations/responsys/shared_properties.js.map +1 -0
- package/dist/destinations/salesforce/lead/index.js +1 -0
- package/dist/destinations/salesforce/lead/index.js.map +1 -1
- package/dist/destinations/salesforce/sf-properties.d.ts +1 -0
- package/dist/destinations/salesforce/sf-properties.js +10 -1
- package/dist/destinations/salesforce/sf-properties.js.map +1 -1
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +35 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +401 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
- package/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("../utils");
|
|
4
|
+
const common_fields_1 = require("../common-fields");
|
|
5
|
+
const action = {
|
|
6
|
+
title: 'Conversion Upload',
|
|
7
|
+
description: 'Send a conversion to Campaign Manager 360.',
|
|
8
|
+
fields: {
|
|
9
|
+
customVariables: {
|
|
10
|
+
label: 'Custom Variables',
|
|
11
|
+
description: 'Custom variables associated with the conversion.',
|
|
12
|
+
type: 'object',
|
|
13
|
+
multiple: true,
|
|
14
|
+
required: false,
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
properties: {
|
|
17
|
+
type: {
|
|
18
|
+
label: 'Type',
|
|
19
|
+
description: 'The type of the custom variable.',
|
|
20
|
+
type: 'string',
|
|
21
|
+
allowNull: false,
|
|
22
|
+
required: true,
|
|
23
|
+
choices: utils_1.getCustomVarTypeChoices()
|
|
24
|
+
},
|
|
25
|
+
value: {
|
|
26
|
+
label: 'Value',
|
|
27
|
+
description: 'The value of the custom variable.',
|
|
28
|
+
type: 'string',
|
|
29
|
+
allowNull: false,
|
|
30
|
+
required: true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
default: {
|
|
34
|
+
'@arrayPath': [
|
|
35
|
+
'$.properties.customVariables',
|
|
36
|
+
{
|
|
37
|
+
type: {
|
|
38
|
+
'@path': '$.type'
|
|
39
|
+
},
|
|
40
|
+
value: {
|
|
41
|
+
'@path': '$.value'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
requiredId: {
|
|
48
|
+
label: 'Required ID',
|
|
49
|
+
description: 'A user identifier record the conversion against. Exactly one of Google Click ID, Display Click ID, Encrypted User ID, Mobile Device ID, Match ID, Impression ID or Encrypted User ID Candidates must be provided.',
|
|
50
|
+
type: 'object',
|
|
51
|
+
required: true,
|
|
52
|
+
properties: {
|
|
53
|
+
gclid: {
|
|
54
|
+
label: 'Google Click ID',
|
|
55
|
+
description: 'The Google Click ID (gclid) associated with the conversion.',
|
|
56
|
+
type: 'string',
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
dclid: {
|
|
60
|
+
label: 'Display Click ID',
|
|
61
|
+
description: 'The Display Click ID (dclid) associated with the conversion.',
|
|
62
|
+
type: 'string',
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
encryptedUserId: {
|
|
66
|
+
label: 'Encrypted User ID',
|
|
67
|
+
description: "The encrypted user ID associated with the conversion. If this field is set then 'Encryption Entity ID', 'Encryption Entity Type' and 'Encryption Source' should also be specified.",
|
|
68
|
+
type: 'string',
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
mobileDeviceId: {
|
|
72
|
+
label: 'Mobile Device ID',
|
|
73
|
+
description: 'The mobile device ID associated with the conversion.',
|
|
74
|
+
type: 'string',
|
|
75
|
+
required: false,
|
|
76
|
+
default: {
|
|
77
|
+
'@path': '$.context.device.id'
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
matchId: {
|
|
81
|
+
label: 'Match ID',
|
|
82
|
+
description: 'The match ID field. A match ID is your own first-party identifier that has been synced with Google using the match ID feature in Floodlight.',
|
|
83
|
+
type: 'string',
|
|
84
|
+
required: false
|
|
85
|
+
},
|
|
86
|
+
impressionId: {
|
|
87
|
+
label: 'Impression ID',
|
|
88
|
+
description: 'The impression ID associated with the conversion.',
|
|
89
|
+
type: 'string',
|
|
90
|
+
required: false
|
|
91
|
+
},
|
|
92
|
+
encryptedUserIdCandidates: {
|
|
93
|
+
label: 'Encrypted User ID Candidates',
|
|
94
|
+
description: 'A comma separated list of the alphanumeric encrypted user IDs. Any user ID with exposure prior to the conversion timestamp will be used in the inserted conversion. If no such user ID is found then the conversion will be rejected with INVALID_ARGUMENT error. When set, `encryptionInfo` should also be specified.',
|
|
95
|
+
type: 'string',
|
|
96
|
+
required: false
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
default: {
|
|
100
|
+
gclid: {
|
|
101
|
+
'@if': {
|
|
102
|
+
exists: { '@path': '$.integrations.Campaign Manager 360.gclid' },
|
|
103
|
+
then: { '@path': '$.integrations.Campaign Manager 360.gclid' },
|
|
104
|
+
else: { '@path': '$.properties.gclid' }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
dclid: {
|
|
108
|
+
'@if': {
|
|
109
|
+
exists: { '@path': '$.integrations.Campaign Manager 360.dclid' },
|
|
110
|
+
then: { '@path': '$.integrations.Campaign Manager 360.dclid' },
|
|
111
|
+
else: { '@path': '$.properties.dclid' }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
encryptedUserId: { '@path': '$.userId' },
|
|
115
|
+
mobileDeviceId: { '@path': '$.context.device.id' },
|
|
116
|
+
matchId: { '@path': '$.properties.matchId' },
|
|
117
|
+
impressionId: { '@path': '$.properties.impressionId' },
|
|
118
|
+
encryptedUserIdCandidates: { '@path': '$.properties.encryptedUserIdCandidates' }
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
...common_fields_1.commonFields
|
|
122
|
+
},
|
|
123
|
+
perform: async (request, { settings, payload, auth }) => {
|
|
124
|
+
return await utils_1.send(request, settings, [payload], false, auth);
|
|
125
|
+
},
|
|
126
|
+
performBatch: async (request, { settings, payload, auth }) => {
|
|
127
|
+
return await utils_1.send(request, settings, payload, false, auth);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
exports.default = action;
|
|
131
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/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EAAE;gBACxC,cAAc,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE;gBAClD,OAAO,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;gBAC5C,YAAY,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE;gBACtD,yBAAyB,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE;aACjF;SACF;QACD,GAAG,4BAAY;KAChB;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QACtD,OAAO,MAAM,YAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,CAAE,CAAA;IAC/D,CAAC;IACD,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAC3D,OAAO,MAAM,YAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAE,CAAA;IAC7D,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../src/destinations/campaign-manager-360/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const conversionUpload_1 = __importDefault(require("./conversionUpload"));
|
|
7
|
+
const conversionAdjustmentUpload_1 = __importDefault(require("./conversionAdjustmentUpload"));
|
|
8
|
+
const destination = {
|
|
9
|
+
name: 'Campaign Manager 360',
|
|
10
|
+
slug: 'campaign-manager-360',
|
|
11
|
+
mode: 'cloud',
|
|
12
|
+
authentication: {
|
|
13
|
+
scheme: 'oauth2',
|
|
14
|
+
fields: {
|
|
15
|
+
profileId: {
|
|
16
|
+
label: 'Profile ID',
|
|
17
|
+
description: 'The ID of the Campaign Manager 360 profile you want to use.',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
defaultFloodlightActivityId: {
|
|
22
|
+
label: 'Default Floodlight Activity ID',
|
|
23
|
+
description: 'The Default Floodlight activity ID associated with all the mappings. Can be overridden in the mapping.',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
defaultFloodlightConfigurationId: {
|
|
28
|
+
label: 'Default Floodlight Configuration ID',
|
|
29
|
+
description: 'The Default Floodlight configuration ID associated with all the mappings. Can be overridden in the mapping.',
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
testAuthentication: (_request) => {
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
refreshAccessToken: async (request, { auth }) => {
|
|
38
|
+
const response = await request('https://www.googleapis.com/oauth2/v4/token', {
|
|
39
|
+
method: 'POST',
|
|
40
|
+
body: new URLSearchParams({
|
|
41
|
+
refresh_token: auth.refreshToken,
|
|
42
|
+
client_id: auth.clientId,
|
|
43
|
+
client_secret: auth.clientSecret,
|
|
44
|
+
grant_type: 'refresh_token'
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
return { accessToken: response.data.access_token };
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
extendRequest({ auth }) {
|
|
51
|
+
return {
|
|
52
|
+
headers: {
|
|
53
|
+
authorization: `Bearer ${auth?.accessToken}`
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
actions: {
|
|
58
|
+
conversionUpload: conversionUpload_1.default,
|
|
59
|
+
conversionAdjustmentUpload: conversionAdjustmentUpload_1.default
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
exports.default = destination;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/campaign-manager-360/index.ts"],"names":[],"mappings":";;;;;AAGA,0EAAiD;AAGjD,8FAAqE;AAErE,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,SAAS,EAAE;gBACT,KAAK,EAAE,YAAY;gBACnB,WAAW,EAAE,6DAA6D;gBAC1E,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,2BAA2B,EAAE;gBAC3B,KAAK,EAAE,gCAAgC;gBACvC,WAAW,EACT,wGAAwG;gBAC1G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;YACD,gCAAgC,EAAE;gBAChC,KAAK,EAAE,qCAAqC;gBAC5C,WAAW,EACT,6GAA6G;gBAC/G,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,EAAE;YAE/B,OAAO,IAAI,CAAA;QACb,CAAC;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YAC9C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAC5B,4CAA4C,EAC5C;gBACE,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CACF,CAAA;YAED,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QACpD,CAAC;KACF;IACD,aAAa,CAAC,EAAE,IAAI,EAAE;QACpB,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;aAC7C;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,gBAAgB,EAAhB,0BAAgB;QAChB,0BAA0B,EAA1B,oCAA0B;KAC3B;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export interface AuthTokenResp {
|
|
2
|
+
access_token: string;
|
|
3
|
+
scope: string;
|
|
4
|
+
expires_in: number;
|
|
5
|
+
token_type: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AddressInfo {
|
|
8
|
+
hashedFirstName?: string;
|
|
9
|
+
hashedLastName?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
state?: string;
|
|
12
|
+
countryCode?: string;
|
|
13
|
+
postalCode?: string;
|
|
14
|
+
hashedStreetAddress?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface UpdateRequest {
|
|
17
|
+
conversions: Conversion[];
|
|
18
|
+
encryptionInfo?: EncryptionInfo;
|
|
19
|
+
kind: 'dfareporting#conversionsBatchUpdateRequest';
|
|
20
|
+
}
|
|
21
|
+
export interface InsertRequest {
|
|
22
|
+
conversions: Conversion[];
|
|
23
|
+
encryptionInfo?: EncryptionInfo;
|
|
24
|
+
kind: 'dfareporting#conversionsBatchInsertRequest';
|
|
25
|
+
}
|
|
26
|
+
export declare type CartData = {
|
|
27
|
+
merchantId: string;
|
|
28
|
+
merchantFeedLabel: string;
|
|
29
|
+
merchantFeedLanguage: string;
|
|
30
|
+
items: CartDataItem[];
|
|
31
|
+
};
|
|
32
|
+
export declare type CartDataItem = {
|
|
33
|
+
itemId: string;
|
|
34
|
+
quantity: number;
|
|
35
|
+
unitPrice: number;
|
|
36
|
+
};
|
|
37
|
+
export declare type Conversion = ConversionBase & {
|
|
38
|
+
customVariables?: CustomVariable[];
|
|
39
|
+
encryptedUserIdCandidates?: string[];
|
|
40
|
+
};
|
|
41
|
+
declare type ExactlyOne<T, Keys extends keyof T = keyof T> = {
|
|
42
|
+
[K in Keys]: Pick<T, K> & Partial<Record<Exclude<Keys, K>, never>>;
|
|
43
|
+
}[Keys];
|
|
44
|
+
declare type ExactlyOneIdentifier = ExactlyOne<{
|
|
45
|
+
encryptedUserId?: string;
|
|
46
|
+
mobileDeviceId?: string;
|
|
47
|
+
matchId?: string;
|
|
48
|
+
gclid?: string;
|
|
49
|
+
dclid?: string;
|
|
50
|
+
impressionId?: string;
|
|
51
|
+
encryptedUserIdCandidates?: string[];
|
|
52
|
+
}>;
|
|
53
|
+
export declare type ConversionBase = ExactlyOneIdentifier & {
|
|
54
|
+
adUserDataConsent?: ConsentType | undefined;
|
|
55
|
+
cartData?: CartData | undefined;
|
|
56
|
+
childDirectedTreatment?: boolean | undefined;
|
|
57
|
+
dclid?: string | undefined;
|
|
58
|
+
encryptedUserId?: string | undefined;
|
|
59
|
+
floodlightActivityId: string;
|
|
60
|
+
floodlightConfigurationId: string;
|
|
61
|
+
gclid?: string | undefined;
|
|
62
|
+
impressionId?: string | undefined;
|
|
63
|
+
kind: 'dfareporting#conversion';
|
|
64
|
+
limitAdTracking?: boolean | undefined;
|
|
65
|
+
matchId?: string | undefined;
|
|
66
|
+
mobileDeviceId?: string | undefined;
|
|
67
|
+
nonPersonalizedAd?: boolean | undefined;
|
|
68
|
+
ordinal: string;
|
|
69
|
+
quantity: string;
|
|
70
|
+
timestampMicros: string;
|
|
71
|
+
treatmentForUnderage?: boolean | undefined;
|
|
72
|
+
userIdentifiers?: UserIdentifier[];
|
|
73
|
+
value: number;
|
|
74
|
+
};
|
|
75
|
+
export interface CustomVariable {
|
|
76
|
+
type: CustomVarTypeChoices;
|
|
77
|
+
value: string;
|
|
78
|
+
kind: 'dfareporting#customFloodlightVariable';
|
|
79
|
+
}
|
|
80
|
+
export interface EncryptionInfo {
|
|
81
|
+
encryptionEntityId: string;
|
|
82
|
+
encryptionEntityType: EntityType;
|
|
83
|
+
encryptionSource: Source;
|
|
84
|
+
kind: 'dfareporting#encryptionInfo';
|
|
85
|
+
}
|
|
86
|
+
export declare type UserIdentifier = {
|
|
87
|
+
hashedEmail: string;
|
|
88
|
+
} | {
|
|
89
|
+
hashedPhoneNumber: string;
|
|
90
|
+
} | {
|
|
91
|
+
addressInfo: AddressInfo;
|
|
92
|
+
};
|
|
93
|
+
export declare const ConsentType: {
|
|
94
|
+
readonly GRANTED: "GRANTED";
|
|
95
|
+
readonly DENIED: "DENIED";
|
|
96
|
+
};
|
|
97
|
+
export declare type ConsentType = typeof ConsentType[keyof typeof ConsentType];
|
|
98
|
+
export declare const EntityType: {
|
|
99
|
+
readonly ADWORDS_CUSTOMER: "ADWORDS_CUSTOMER";
|
|
100
|
+
readonly DBM_ADVERTISER: "DBM_ADVERTISER";
|
|
101
|
+
readonly DBM_PARTNER: "DBM_PARTNER";
|
|
102
|
+
readonly DCM_ACCOUNT: "DCM_ACCOUNT";
|
|
103
|
+
readonly DCM_ADVERTISER: "DCM_ADVERTISER";
|
|
104
|
+
readonly ENCRYPTION_ENTITY_TYPE_UNKNOWN: "ENCRYPTION_ENTITY_TYPE_UNKNOWN";
|
|
105
|
+
readonly DFP_NETWORK_CODE: "DFP_NETWORK_CODE";
|
|
106
|
+
};
|
|
107
|
+
export declare type EntityType = typeof EntityType[keyof typeof EntityType];
|
|
108
|
+
export declare const Source: {
|
|
109
|
+
readonly AD_SERVING: "AD_SERVING";
|
|
110
|
+
readonly ENCRYPTION_SCOPE_UNKNOWN: "ENCRYPTION_SCOPE_UNKNOWN";
|
|
111
|
+
readonly DATA_TRANSFER: "DATA_TRANSFER";
|
|
112
|
+
};
|
|
113
|
+
export declare type Source = typeof Source[keyof typeof Source];
|
|
114
|
+
export declare const CustomVarTypeChoices: string[];
|
|
115
|
+
export declare type CustomVarTypeChoices = typeof CustomVarTypeChoices[number];
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomVarTypeChoices = exports.Source = exports.EntityType = exports.ConsentType = void 0;
|
|
4
|
+
exports.ConsentType = {
|
|
5
|
+
GRANTED: 'GRANTED',
|
|
6
|
+
DENIED: 'DENIED'
|
|
7
|
+
};
|
|
8
|
+
exports.EntityType = {
|
|
9
|
+
ADWORDS_CUSTOMER: 'ADWORDS_CUSTOMER',
|
|
10
|
+
DBM_ADVERTISER: 'DBM_ADVERTISER',
|
|
11
|
+
DBM_PARTNER: 'DBM_PARTNER',
|
|
12
|
+
DCM_ACCOUNT: 'DCM_ACCOUNT',
|
|
13
|
+
DCM_ADVERTISER: 'DCM_ADVERTISER',
|
|
14
|
+
ENCRYPTION_ENTITY_TYPE_UNKNOWN: 'ENCRYPTION_ENTITY_TYPE_UNKNOWN',
|
|
15
|
+
DFP_NETWORK_CODE: 'DFP_NETWORK_CODE'
|
|
16
|
+
};
|
|
17
|
+
exports.Source = {
|
|
18
|
+
AD_SERVING: 'AD_SERVING',
|
|
19
|
+
ENCRYPTION_SCOPE_UNKNOWN: 'ENCRYPTION_SCOPE_UNKNOWN',
|
|
20
|
+
DATA_TRANSFER: 'DATA_TRANSFER'
|
|
21
|
+
};
|
|
22
|
+
exports.CustomVarTypeChoices = Array.from({ length: 100 }, (_, i) => `U${i + 1}`);
|
|
23
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/destinations/campaign-manager-360/types.ts"],"names":[],"mappings":";;;AAuGa,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAA;AAIG,QAAA,UAAU,GAAG;IACxB,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;IAChC,8BAA8B,EAAE,gCAAgC;IAChE,gBAAgB,EAAE,kBAAkB;CAC5B,CAAA;AAIG,QAAA,MAAM,GAAG;IACpB,UAAU,EAAE,YAAY;IACxB,wBAAwB,EAAE,0BAA0B;IACpD,aAAa,EAAE,eAAe;CACtB,CAAA;AAIG,QAAA,oBAAoB,GAAG,KAAK,CAAC,IAAI,CAC5C,EAAE,MAAM,EAAE,GAAG,EAAE,EACf,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CACtB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import { Payload as UploadPayload } from './conversionUpload/generated-types';
|
|
3
|
+
import { Payload as Adjustayload } from './conversionAdjustmentUpload/generated-types';
|
|
4
|
+
import { AuthTokens } from '@segment/actions-core/destination-kit/parse-settings';
|
|
5
|
+
import { Settings } from './generated-types';
|
|
6
|
+
import { InsertRequest } from './types';
|
|
7
|
+
export declare function send(request: RequestClient, settings: Settings, payloads: UploadPayload[] | Adjustayload[], isAdjustment: boolean, auth?: AuthTokens): Promise<import("@segment/actions-core/src").ModifiedResponse<unknown>>;
|
|
8
|
+
export declare function getJSON(payloads: UploadPayload[] | Adjustayload[], settings: Settings): InsertRequest;
|
|
9
|
+
export declare function maybeHash(value: string | undefined): string | undefined;
|
|
10
|
+
export declare function getCustomVarTypeChoices(): Array<{
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function getEntityTypeChoices(): Array<{
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function getSources(): Array<{
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSources = exports.getEntityTypeChoices = exports.getCustomVarTypeChoices = exports.maybeHash = exports.getJSON = exports.send = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
6
|
+
const types_1 = require("./types");
|
|
7
|
+
async function send(request, settings, payloads, isAdjustment, auth) {
|
|
8
|
+
const json = getJSON(payloads, settings);
|
|
9
|
+
if (json.conversions.length === 0) {
|
|
10
|
+
maybeThrow(`No valid payloads found in batch of size ${payloads.length}`, true);
|
|
11
|
+
}
|
|
12
|
+
const response = await request(`https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/${settings.profileId}/conversions/batch` +
|
|
13
|
+
(isAdjustment ? 'update' : 'insert'), {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
headers: {
|
|
16
|
+
Authorization: `Bearer ${auth?.accessToken}`,
|
|
17
|
+
'Content-Type': 'application/json',
|
|
18
|
+
Host: 'dfareporting.googleapis.com'
|
|
19
|
+
},
|
|
20
|
+
json
|
|
21
|
+
});
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
exports.send = send;
|
|
25
|
+
function getJSON(payloads, settings) {
|
|
26
|
+
const json = {
|
|
27
|
+
conversions: [],
|
|
28
|
+
kind: 'dfareporting#conversionsBatchInsertRequest'
|
|
29
|
+
};
|
|
30
|
+
const shouldThrow = payloads.length === 1;
|
|
31
|
+
for (const payload of payloads) {
|
|
32
|
+
const { customVariables, requiredId: { encryptedUserIdCandidates } } = payload;
|
|
33
|
+
const { requiredId: { gclid, dclid, encryptedUserId, mobileDeviceId, matchId, impressionId }, encryptionInfo, adUserDataConsent, cartDataItems, merchantId, merchantFeedLabel, merchantFeedLanguage, userDetails, floodlightActivityId, floodlightConfigurationId, timestamp, value, ordinal, quantity, limitAdTracking, childDirectedTreatment, nonPersonalizedAd, treatmentForUnderage } = payload;
|
|
34
|
+
if ([gclid, dclid, encryptedUserId, mobileDeviceId, matchId, impressionId, encryptedUserIdCandidates].filter(Boolean)
|
|
35
|
+
.length !== 1) {
|
|
36
|
+
maybeThrow('Exactly one of Google Click ID, Display Click ID, Encrypted User ID, Mobile Device ID, Match ID, Impression ID or Encrypted User ID Candidates is required', shouldThrow);
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (!floodlightActivityId && !settings.defaultFloodlightActivityId) {
|
|
40
|
+
maybeThrow('Floodlight Activity ID is required', shouldThrow);
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (!floodlightConfigurationId && !settings.defaultFloodlightConfigurationId) {
|
|
44
|
+
maybeThrow('Floodlight Configuration ID is required', shouldThrow);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
if ((encryptedUserId || encryptedUserIdCandidates) && !encryptionInfo) {
|
|
48
|
+
maybeThrow('Encrypted Info field should be populated if either Encrypted User ID or Encrypted User ID Candidates fields are populated', shouldThrow);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const conversion = {
|
|
52
|
+
adUserDataConsent: adUserDataConsent,
|
|
53
|
+
cartData: (() => {
|
|
54
|
+
if (!Array.isArray(cartDataItems) ||
|
|
55
|
+
cartDataItems.length === 0 ||
|
|
56
|
+
merchantId ||
|
|
57
|
+
!merchantFeedLabel ||
|
|
58
|
+
!merchantFeedLanguage) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
merchantId,
|
|
63
|
+
merchantFeedLabel,
|
|
64
|
+
merchantFeedLanguage,
|
|
65
|
+
items: cartDataItems
|
|
66
|
+
};
|
|
67
|
+
})(),
|
|
68
|
+
childDirectedTreatment: childDirectedTreatment ?? undefined,
|
|
69
|
+
dclid: dclid ?? undefined,
|
|
70
|
+
encryptedUserId: encryptedUserId ?? undefined,
|
|
71
|
+
floodlightActivityId: (floodlightActivityId ?? settings.defaultFloodlightActivityId),
|
|
72
|
+
floodlightConfigurationId: (floodlightConfigurationId ?? settings.defaultFloodlightConfigurationId),
|
|
73
|
+
gclid: gclid ?? undefined,
|
|
74
|
+
impressionId: impressionId ?? undefined,
|
|
75
|
+
kind: 'dfareporting#conversion',
|
|
76
|
+
limitAdTracking: limitAdTracking ?? undefined,
|
|
77
|
+
matchId: matchId ?? undefined,
|
|
78
|
+
mobileDeviceId: mobileDeviceId ?? undefined,
|
|
79
|
+
nonPersonalizedAd: nonPersonalizedAd ?? undefined,
|
|
80
|
+
ordinal,
|
|
81
|
+
quantity,
|
|
82
|
+
timestampMicros: (() => {
|
|
83
|
+
return String(BigInt(new Date(timestamp).getTime()));
|
|
84
|
+
})(),
|
|
85
|
+
treatmentForUnderage: treatmentForUnderage ?? undefined,
|
|
86
|
+
userIdentifiers: (() => {
|
|
87
|
+
const { email, phone, firstName, lastName, streetAddress, city, state, postalCode, countryCode } = userDetails ?? {};
|
|
88
|
+
const identifiers = [];
|
|
89
|
+
if (email) {
|
|
90
|
+
identifiers.push({ hashedEmail: maybeHash(email) });
|
|
91
|
+
}
|
|
92
|
+
if (phone) {
|
|
93
|
+
identifiers.push({ hashedPhoneNumber: maybeHash(phone) });
|
|
94
|
+
}
|
|
95
|
+
if (firstName || lastName || streetAddress || city || state || postalCode || countryCode) {
|
|
96
|
+
const addressInfo = {
|
|
97
|
+
hashedFirstName: maybeHash(firstName),
|
|
98
|
+
hashedLastName: maybeHash(lastName),
|
|
99
|
+
hashedStreetAddress: maybeHash(streetAddress),
|
|
100
|
+
city: city ?? undefined,
|
|
101
|
+
state: state ?? undefined,
|
|
102
|
+
postalCode: postalCode ?? undefined,
|
|
103
|
+
countryCode: countryCode ?? undefined
|
|
104
|
+
};
|
|
105
|
+
identifiers.push({ addressInfo });
|
|
106
|
+
}
|
|
107
|
+
return identifiers;
|
|
108
|
+
})(),
|
|
109
|
+
value,
|
|
110
|
+
customVariables: Array.isArray(customVariables)
|
|
111
|
+
? customVariables
|
|
112
|
+
.filter((c) => c.type.length > 0 && c.value.length > 0)
|
|
113
|
+
.map((c) => ({
|
|
114
|
+
type: c.type,
|
|
115
|
+
value: c.value,
|
|
116
|
+
kind: 'dfareporting#customFloodlightVariable'
|
|
117
|
+
}))
|
|
118
|
+
: [],
|
|
119
|
+
encryptedUserIdCandidates: encryptedUserIdCandidates
|
|
120
|
+
?.split(',')
|
|
121
|
+
.map(maybeHash)
|
|
122
|
+
.filter((str) => str !== undefined) ?? []
|
|
123
|
+
};
|
|
124
|
+
json.conversions.push(conversion);
|
|
125
|
+
json.encryptionInfo =
|
|
126
|
+
encryptedUserId || encryptedUserIdCandidates
|
|
127
|
+
? {
|
|
128
|
+
...encryptionInfo,
|
|
129
|
+
kind: 'dfareporting#encryptionInfo'
|
|
130
|
+
}
|
|
131
|
+
: undefined;
|
|
132
|
+
}
|
|
133
|
+
return json;
|
|
134
|
+
}
|
|
135
|
+
exports.getJSON = getJSON;
|
|
136
|
+
function maybeThrow(message, shouldThrow) {
|
|
137
|
+
if (shouldThrow) {
|
|
138
|
+
throw new actions_core_1.PayloadValidationError(message);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function maybeHash(value) {
|
|
142
|
+
if (value === undefined) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
const isHashed = new RegExp(/[0-9abcdef]{64}/gi).test(value);
|
|
146
|
+
if (isHashed) {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
const hash = crypto_1.createHash('sha256');
|
|
150
|
+
hash.update(value);
|
|
151
|
+
return hash.digest('hex');
|
|
152
|
+
}
|
|
153
|
+
exports.maybeHash = maybeHash;
|
|
154
|
+
function getCustomVarTypeChoices() {
|
|
155
|
+
return types_1.CustomVarTypeChoices.map((item) => ({
|
|
156
|
+
label: item,
|
|
157
|
+
value: item
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
exports.getCustomVarTypeChoices = getCustomVarTypeChoices;
|
|
161
|
+
function getEntityTypeChoices() {
|
|
162
|
+
return Object.values(types_1.EntityType).map((item) => ({
|
|
163
|
+
label: item,
|
|
164
|
+
value: item
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
exports.getEntityTypeChoices = getEntityTypeChoices;
|
|
168
|
+
function getSources() {
|
|
169
|
+
return Object.values(types_1.Source).map((item) => ({
|
|
170
|
+
label: item,
|
|
171
|
+
value: item
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
exports.getSources = getSources;
|
|
175
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/destinations/campaign-manager-360/utils.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,wDAA6E;AAM7E,mCAWgB;AAET,KAAK,UAAU,IAAI,CACxB,OAAsB,EACtB,QAAkB,EAClB,QAA0C,EAC1C,YAAqB,EACrB,IAAiB;IAEjB,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAExC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QACjC,UAAU,CAAC,4CAA4C,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAA;KAChF;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAC5B,oEAAoE,QAAQ,CAAC,SAAS,oBAAoB;QACxG,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EACtC;QACE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;YAC5C,cAAc,EAAE,kBAAkB;YAClC,IAAI,EAAE,6BAA6B;SACpC;QACD,IAAI;KACL,CACF,CAAA;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC;AA3BD,oBA2BC;AAED,SAA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AAuB;IACrC,OAAO,4BAAoB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACzC,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,CAAA;AACL,CAAC;AALD,0DAKC;AAED,SAAgB,oBAAoB;IAClC,OAAO,MAAM,CAAC,MAAM,CAAC,kBAAU,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9C,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,CAAA;AACL,CAAC;AALD,oDAKC;AAED,SAAgB,UAAU;IACxB,OAAO,MAAM,CAAC,MAAM,CAAC,cAAM,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1C,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC,CAAA;AACL,CAAC;AALD,gCAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/contentstack/customAttributesSync/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("./utils");
|
|
4
|
+
const action = {
|
|
5
|
+
title: 'Custom Attributes Sync',
|
|
6
|
+
description: 'Sync Custom Attributes to your Contentstack Experience.',
|
|
7
|
+
defaultSubscription: 'type = "identify"',
|
|
8
|
+
fields: {
|
|
9
|
+
traits: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
default: { '@path': '$.traits' },
|
|
12
|
+
label: 'User traits',
|
|
13
|
+
description: 'User Profile traits to send to Contentstack',
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
userId: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: { '@path': '$.userId' },
|
|
19
|
+
label: 'User ID',
|
|
20
|
+
description: 'ID for the user',
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
createAttributes: {
|
|
24
|
+
label: 'Create Attributes',
|
|
25
|
+
type: 'boolean',
|
|
26
|
+
description: 'Inidicates if Attributes should be created in Contentstack',
|
|
27
|
+
required: false,
|
|
28
|
+
default: { '@path': '$.integrations.Contentstack.createAttributes' }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
perform: async (request, { payload, settings }) => {
|
|
32
|
+
const { createAttributes } = payload;
|
|
33
|
+
if (createAttributes) {
|
|
34
|
+
const personalizeAttributesData = (await utils_1.fetchAllAttributes(request, settings.personalizeApiBaseUrl)).map((attribute) => attribute?.key);
|
|
35
|
+
const attributesToCreate = Object.keys(payload.traits || {}).filter((trait) => !personalizeAttributesData.includes(trait));
|
|
36
|
+
if (attributesToCreate?.length) {
|
|
37
|
+
const firstAttributeRes = await utils_1.createCustomAttrbute(request, attributesToCreate[0], settings.personalizeApiBaseUrl);
|
|
38
|
+
if (firstAttributeRes.status === 401)
|
|
39
|
+
return firstAttributeRes;
|
|
40
|
+
const otherAttributes = attributesToCreate.slice(1);
|
|
41
|
+
await Promise.allSettled(otherAttributes.map((trait) => utils_1.createCustomAttrbute(request, trait, settings.personalizeApiBaseUrl)));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return request(`${settings.personalizeEdgeApiBaseUrl}/user-attributes`, {
|
|
45
|
+
method: 'patch',
|
|
46
|
+
json: payload.traits,
|
|
47
|
+
headers: {
|
|
48
|
+
'x-cs-eclipse-user-uid': payload.userId ?? ''
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = action;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|