@segment/action-destinations 3.281.0 → 3.282.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/destinations/amplitude/logPurchase/index.js +16 -1
- package/dist/destinations/amplitude/logPurchase/index.js.map +1 -1
- package/dist/destinations/courier/audienceToList/generated-types.d.ts +11 -0
- package/dist/destinations/{engage-messaging-sendgrid/sendEmail.types.js → courier/audienceToList/generated-types.js} +1 -1
- package/dist/destinations/courier/audienceToList/generated-types.js.map +1 -0
- package/dist/destinations/courier/audienceToList/index.d.ts +9 -0
- package/dist/destinations/courier/audienceToList/index.js +107 -0
- package/dist/destinations/courier/audienceToList/index.js.map +1 -0
- package/dist/destinations/courier/index.d.ts +1 -0
- package/dist/destinations/courier/index.js +19 -1
- package/dist/destinations/courier/index.js.map +1 -1
- package/dist/destinations/courier/postToCourier/generated-types.d.ts +1 -0
- package/dist/destinations/courier/postToCourier/index.js +14 -6
- package/dist/destinations/courier/postToCourier/index.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/generated-types.d.ts +1 -1
- package/dist/destinations/dynamic-yield-audiences/index.js +19 -20
- package/dist/destinations/dynamic-yield-audiences/index.js.map +1 -1
- package/dist/destinations/dynamic-yield-audiences/syncAudience/generated-types.d.ts +1 -1
- package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js +26 -16
- package/dist/destinations/dynamic-yield-audiences/syncAudience/index.js.map +1 -1
- package/dist/destinations/engage-messaging-sendgrid/index.d.ts +4 -3
- package/dist/destinations/engage-messaging-sendgrid/index.js +68 -16
- package/dist/destinations/engage-messaging-sendgrid/index.js.map +1 -1
- package/dist/destinations/{engage/utils → engage-messaging-sendgrid/previewApiLookup}/apiLookups.d.ts +2 -2
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/apiLookups.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio/sendSms.types.js → engage-messaging-sendgrid/previewApiLookup/generated-types.js} +1 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendMobilePush/actionDefinition.d.ts → engage-messaging-sendgrid/previewApiLookup/index.d.ts} +1 -0
- package/dist/destinations/{engage/sendgrid/previewApiLookup/actionDefinition.js → engage-messaging-sendgrid/previewApiLookup/index.js} +3 -2
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup/index.js.map +1 -0
- package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/SendEmailPerformer.d.ts +2 -3
- package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/SendEmailPerformer.js +10 -10
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/{engage/sendgrid/sendEmail/actionDefinition.d.ts → engage-messaging-sendgrid/sendEmail/index.d.ts} +1 -0
- package/dist/destinations/{engage/sendgrid/sendEmail/actionDefinition.js → engage-messaging-sendgrid/sendEmail/index.js} +3 -2
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/index.d.ts +4 -3
- package/dist/destinations/engage-messaging-twilio/index.js +169 -15
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendMobilePush/PushSender.d.ts +1 -1
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendMobilePush/PushSender.js +2 -2
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/PushSender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendWhatsApp/actionDefinition.d.ts → engage-messaging-twilio/sendMobilePush/index.d.ts} +1 -0
- package/dist/destinations/{engage/twilio/sendMobilePush/actionDefinition.js → engage-messaging-twilio/sendMobilePush/index.js} +2 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush/index.js.map +1 -0
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendSms/SmsMessageSender.d.ts +1 -1
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendSms/SmsMessageSender.js +2 -2
- package/dist/destinations/engage-messaging-twilio/sendSms/SmsMessageSender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/{engage/twilio/sendSms/actionDefinition.d.ts → engage-messaging-twilio/sendSms/index.d.ts} +1 -0
- package/dist/destinations/{engage/twilio/sendSms/actionDefinition.js → engage-messaging-twilio/sendSms/index.js} +2 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendWhatsApp/WhatsAppMessageSender.js +4 -4
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.d.ts +5 -0
- package/dist/destinations/{engage/twilio/sendWhatsApp/actionDefinition.js → engage-messaging-twilio/sendWhatsApp/index.js} +2 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/PhoneMessageSender.d.ts +1 -1
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/PhoneMessageSender.js +2 -2
- package/dist/destinations/engage-messaging-twilio/utils/PhoneMessageSender.js.map +1 -0
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/TwilioMessageSender.d.ts +1 -1
- package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/TwilioMessageSender.js +6 -6
- package/dist/destinations/engage-messaging-twilio/utils/TwilioMessageSender.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/index.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/utils/types.js.map +1 -0
- package/dist/destinations/google-sheets/postSheet/generated-types.d.ts +0 -1
- package/dist/destinations/google-sheets/postSheet/index.js +5 -13
- package/dist/destinations/google-sheets/postSheet/index.js.map +1 -1
- package/dist/destinations/google-sheets-dev/postSheet.types.d.ts +0 -1
- package/dist/destinations/klaviyo/functions.d.ts +1 -1
- package/dist/destinations/klaviyo/properties.js +1 -1
- package/dist/destinations/klaviyo/upsertProfile/index.js +4 -5
- package/dist/destinations/klaviyo/upsertProfile/index.js.map +1 -1
- package/dist/destinations/loops/sendEvent/generated-types.d.ts +3 -0
- package/dist/destinations/loops/sendEvent/index.js +9 -1
- package/dist/destinations/loops/sendEvent/index.js.map +1 -1
- package/dist/destinations/pinterest-conversions/pinterset-capi-user-data.js +15 -1
- package/dist/destinations/pinterest-conversions/pinterset-capi-user-data.js.map +1 -1
- package/dist/destinations/pinterest-conversions/reportConversionEvent/generated-types.d.ts +2 -0
- package/dist/destinations/segment/index.js +1 -5
- package/dist/destinations/segment/index.js.map +1 -1
- package/dist/destinations/segment/properties.d.ts +0 -4
- package/dist/destinations/segment/properties.js +1 -14
- package/dist/destinations/segment/properties.js.map +1 -1
- package/dist/destinations/taboola-actions/index.js +10 -11
- package/dist/destinations/taboola-actions/index.js.map +1 -1
- package/dist/destinations/taboola-actions/syncAudience/client.d.ts +8 -3
- package/dist/destinations/taboola-actions/syncAudience/client.js +22 -2
- package/dist/destinations/taboola-actions/syncAudience/client.js.map +1 -1
- package/dist/destinations/taboola-actions/syncAudience/index.js +1 -13
- package/dist/destinations/taboola-actions/syncAudience/index.js.map +1 -1
- package/dist/destinations/tiktok-conversions/common_fields.js +86 -1
- package/dist/destinations/tiktok-conversions/common_fields.js.map +1 -1
- package/dist/destinations/tiktok-conversions/formatter.d.ts +2 -0
- package/dist/destinations/tiktok-conversions/formatter.js +16 -1
- package/dist/destinations/tiktok-conversions/formatter.js.map +1 -1
- package/dist/destinations/tiktok-conversions/reportWebEvent/generated-types.d.ts +8 -0
- package/dist/destinations/tiktok-conversions/utils.js +7 -1
- package/dist/destinations/tiktok-conversions/utils.js.map +1 -1
- package/package.json +4 -4
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +0 -3
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +0 -70
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/index.d.ts +0 -2
- package/dist/destinations/engage/sendgrid/index.js +0 -5
- package/dist/destinations/engage/sendgrid/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +0 -4
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +0 -14
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +0 -14
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +0 -1
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +0 -1
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +0 -3
- package/dist/destinations/engage/twilio/destinationDefinition.js +0 -172
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/index.d.ts +0 -2
- package/dist/destinations/engage/twilio/index.js +0 -5
- package/dist/destinations/engage/twilio/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +0 -14
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendSms/index.js +0 -14
- package/dist/destinations/engage/twilio/sendSms/index.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +0 -1
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +0 -14
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/index.js.map +0 -1
- package/dist/destinations/engage/twilio/utils/types.js.map +0 -1
- package/dist/destinations/engage/utils/AggregateError.d.ts +0 -14
- package/dist/destinations/engage/utils/AggregateError.js +0 -26
- package/dist/destinations/engage/utils/AggregateError.js.map +0 -1
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +0 -42
- package/dist/destinations/engage/utils/EngageActionPerformer.js +0 -148
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/EngageLogger.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageLogger.js +0 -52
- package/dist/destinations/engage/utils/EngageLogger.js.map +0 -1
- package/dist/destinations/engage/utils/EngageStats.d.ts +0 -18
- package/dist/destinations/engage/utils/EngageStats.js +0 -95
- package/dist/destinations/engage/utils/EngageStats.js.map +0 -1
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +0 -12
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +0 -31
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +0 -1
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +0 -65
- package/dist/destinations/engage/utils/MessageSendPerformer.js +0 -211
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +0 -1
- package/dist/destinations/engage/utils/Profile.d.ts +0 -6
- package/dist/destinations/engage/utils/Profile.js +0 -3
- package/dist/destinations/engage/utils/Profile.js.map +0 -1
- package/dist/destinations/engage/utils/ResponseError.d.ts +0 -25
- package/dist/destinations/engage/utils/ResponseError.js +0 -22
- package/dist/destinations/engage/utils/ResponseError.js.map +0 -1
- package/dist/destinations/engage/utils/apiLookups.js.map +0 -1
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +0 -2
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +0 -10
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +0 -1
- package/dist/destinations/engage/utils/index.d.ts +0 -9
- package/dist/destinations/engage/utils/index.js +0 -22
- package/dist/destinations/engage/utils/index.js.map +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +0 -1
- package/dist/destinations/engage/utils/isDestinationActionService.js +0 -8
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +0 -1
- package/dist/destinations/engage/utils/isRetryableError.d.ts +0 -2
- package/dist/destinations/engage/utils/isRetryableError.js +0 -33
- package/dist/destinations/engage/utils/isRetryableError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +0 -46
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +0 -12
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +0 -35
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +0 -14
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +0 -31
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +0 -104
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +0 -39
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +0 -130
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +0 -377
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +0 -23
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +0 -49
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +0 -6
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +0 -3
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +0 -10
- package/dist/destinations/engage/utils/operationTracking/index.js +0 -23
- package/dist/destinations/engage/utils/operationTracking/index.js.map +0 -1
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +0 -21
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +0 -99
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +0 -1
- package/dist/destinations/engage/utils/testUtils.d.ts +0 -6
- package/dist/destinations/engage/utils/testUtils.js +0 -26
- package/dist/destinations/engage/utils/testUtils.js.map +0 -1
- package/dist/destinations/engage/utils/track.d.ts +0 -52
- package/dist/destinations/engage/utils/track.js +0 -9
- package/dist/destinations/engage/utils/track.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +0 -3
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +0 -1
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +0 -3
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +0 -1
- /package/dist/destinations/{engage/utils → engage-messaging-sendgrid/previewApiLookup}/apiLookups.js +0 -0
- /package/dist/destinations/engage-messaging-sendgrid/{previewApiLookup.types.d.ts → previewApiLookup/generated-types.d.ts} +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/UnlayerResponse.d.ts +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/UnlayerResponse.js +0 -0
- /package/dist/destinations/engage-messaging-sendgrid/{sendEmail.types.d.ts → sendEmail/generated-types.d.ts} +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/insertEmailPreviewText.d.ts +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/insertEmailPreviewText.js +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/isRestrictedDomain.d.ts +0 -0
- /package/dist/destinations/{engage/sendgrid → engage-messaging-sendgrid}/sendEmail/isRestrictedDomain.js +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendMobilePush.types.d.ts → sendMobilePush/generated-types.d.ts} +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendSms.types.d.ts → sendSms/generated-types.d.ts} +0 -0
- /package/dist/destinations/{engage/twilio → engage-messaging-twilio}/sendWhatsApp/WhatsAppMessageSender.d.ts +0 -0
- /package/dist/destinations/engage-messaging-twilio/{sendWhatsApp.types.d.ts → sendWhatsApp/generated-types.d.ts} +0 -0
- /package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/index.d.ts +0 -0
- /package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/index.js +0 -0
- /package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/types.d.ts +0 -0
- /package/dist/destinations/{engage/twilio → engage-messaging-twilio}/utils/types.js +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationErrorHandler = void 0;
|
|
4
|
-
class OperationErrorHandler {
|
|
5
|
-
static getTryCatchFinallyHook(_ctx) {
|
|
6
|
-
return this;
|
|
7
|
-
}
|
|
8
|
-
static onCatch(ctx) {
|
|
9
|
-
const dArgs = ctx.decoratorArgs;
|
|
10
|
-
ctx.error = this.wrap(ctx.error, () => {
|
|
11
|
-
dArgs?.onError?.apply(this, [ctx]);
|
|
12
|
-
return ctx.error;
|
|
13
|
-
}, ctx);
|
|
14
|
-
}
|
|
15
|
-
static wrap(originalError, getWrapper, ctx) {
|
|
16
|
-
const wrapper = getWrapper(originalError);
|
|
17
|
-
if (wrapper && originalError !== wrapper)
|
|
18
|
-
wrapper.underlyingError = originalError;
|
|
19
|
-
const trackedError = wrapper;
|
|
20
|
-
if (!trackedError)
|
|
21
|
-
return;
|
|
22
|
-
if (!ctx)
|
|
23
|
-
return;
|
|
24
|
-
if (!trackedError.trackedContext)
|
|
25
|
-
trackedError.trackedContext = ctx;
|
|
26
|
-
const trackedContextProp = Object.getOwnPropertyDescriptor(trackedError, 'trackedContext');
|
|
27
|
-
if (trackedContextProp?.enumerable) {
|
|
28
|
-
trackedContextProp.enumerable = false;
|
|
29
|
-
Object.defineProperty(trackedError, 'trackedContext', trackedContextProp);
|
|
30
|
-
}
|
|
31
|
-
return wrapper;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.OperationErrorHandler = OperationErrorHandler;
|
|
35
|
-
//# sourceMappingURL=OperationErrorHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationErrorHandler.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationErrorHandler.ts"],"names":[],"mappings":";;;AAaA,MAAa,qBAAqB;IAChC,MAAM,CAAC,sBAAsB,CAAC,IAAkC;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,GAAiC;QAC9C,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAA;QAG/B,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CACnB,GAAG,CAAC,KAAK,EACT,GAAG,EAAE;YAEH,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;YAClC,OAAO,GAAG,CAAC,KAAqB,CAAA;QAClC,CAAC,EACD,GAAG,CACJ,CAAA;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CACT,aAAsB,EACtB,UAA+C,EAC/C,GAAc;QAEd,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAiB,CAAA;QAEzD,IAAI,OAAO,IAAI,aAAa,KAAK,OAAO;YAAE,OAAO,CAAC,eAAe,GAAG,aAAa,CAAA;QAEjF,MAAM,YAAY,GAAG,OAAO,CAAA;QAC5B,IAAI,CAAC,YAAY;YAAE,OAAM;QAEzB,IAAI,CAAC,GAAG;YAAE,OAAM;QAGhB,IAAI,CAAC,YAAY,CAAC,cAAc;YAAE,YAAY,CAAC,cAAc,GAAG,GAAG,CAAA;QAGnE,MAAM,kBAAkB,GAAG,MAAM,CAAC,wBAAwB,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;QAC1F,IAAI,kBAAkB,EAAE,UAAU,EAAE;YAElC,kBAAkB,CAAC,UAAU,GAAG,KAAK,CAAA;YACrC,MAAM,CAAC,cAAc,CAAC,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,CAAA;SAC1E;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AA/CD,sDA+CC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
2
|
-
export declare type OperationFinallyHooksContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
3
|
-
onFinally: (() => void)[];
|
|
4
|
-
decoratorArgs?: {
|
|
5
|
-
onTry?: (ctx: TContext) => void;
|
|
6
|
-
onFinally?: (ctx: TContext) => void;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare class OperationFinallyHooks {
|
|
10
|
-
static getTryCatchFinallyHook(_ctx: OperationFinallyHooksContext): TryCatchFinallyHook<OperationFinallyHooksContext>;
|
|
11
|
-
static getPriority(): number;
|
|
12
|
-
static onTry<TContext extends TryCatchFinallyContext>(ctx: OperationFinallyHooksContext<TContext>): void;
|
|
13
|
-
static onFinally<TContext extends TryCatchFinallyContext>(ctx: OperationFinallyHooksContext<TContext>): void;
|
|
14
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationFinallyHooks = void 0;
|
|
4
|
-
class OperationFinallyHooks {
|
|
5
|
-
static getTryCatchFinallyHook(_ctx) {
|
|
6
|
-
return this;
|
|
7
|
-
}
|
|
8
|
-
static getPriority() {
|
|
9
|
-
return 100;
|
|
10
|
-
}
|
|
11
|
-
static onTry(ctx) {
|
|
12
|
-
ctx.onFinally = [];
|
|
13
|
-
ctx.decoratorArgs?.onTry?.(ctx);
|
|
14
|
-
}
|
|
15
|
-
static onFinally(ctx) {
|
|
16
|
-
for (const hook of ctx.onFinally) {
|
|
17
|
-
try {
|
|
18
|
-
hook();
|
|
19
|
-
}
|
|
20
|
-
catch (e) {
|
|
21
|
-
const error = e;
|
|
22
|
-
const loggerCtx = ctx;
|
|
23
|
-
if (loggerCtx.logs)
|
|
24
|
-
loggerCtx.logs.push(`Error in onFinally hook: ${error?.message || error.toString()}`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
ctx.decoratorArgs?.onFinally?.(ctx);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.OperationFinallyHooks = OperationFinallyHooks;
|
|
31
|
-
//# sourceMappingURL=OperationFinallyHooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationFinallyHooks.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationFinallyHooks.ts"],"names":[],"mappings":";;;AAeA,MAAa,qBAAqB;IAChC,MAAM,CAAC,sBAAsB,CAAC,IAAkC;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,CAAC,WAAW;QAChB,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,KAAK,CAA0C,GAA2C;QAC/F,GAAG,CAAC,SAAS,GAAG,EAAE,CAAA;QAClB,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAA;IACjC,CAAC;IAED,MAAM,CAAC,SAAS,CAA0C,GAA2C;QACnG,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,SAAS,EAAE;YAChC,IAAI;gBACF,IAAI,EAAE,CAAA;aACP;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,KAAK,GAAG,CAAU,CAAA;gBAExB,MAAM,SAAS,GAAG,GAAsC,CAAA;gBACxD,IAAI,SAAS,CAAC,IAAI;oBAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;aAC1G;SACF;QACD,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC;CACF;AA1BD,sDA0BC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
2
|
-
import { TrackedError } from './TrackedError';
|
|
3
|
-
import { OperationDecoratorContext } from './OperationDecorator';
|
|
4
|
-
export declare type OperationLoggerContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
5
|
-
logs: string[];
|
|
6
|
-
logMetadata?: Record<string, unknown>;
|
|
7
|
-
decoratorArgs?: OperationLoggerDecoratorArgs;
|
|
8
|
-
sharedContext: OperationLoggerSharedContext;
|
|
9
|
-
};
|
|
10
|
-
export interface OperationLoggerSharedContext {
|
|
11
|
-
logs: string[];
|
|
12
|
-
logMetadata?: Record<string, unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface OperationLoggerDecoratorArgs {
|
|
15
|
-
shouldLog?: (ctx: OperationLoggerContext) => boolean | void;
|
|
16
|
-
}
|
|
17
|
-
export declare abstract class OperationLogger implements TryCatchFinallyHook<OperationLoggerContext> {
|
|
18
|
-
static getTryCatchFinallyHook(_ctx: OperationLoggerContext): TryCatchFinallyHook<OperationLoggerContext>;
|
|
19
|
-
abstract logInfo(msg: string, metadata?: object): void;
|
|
20
|
-
abstract logError(msg: string, metadata?: object): void;
|
|
21
|
-
onTry(ctx: OperationLoggerContext): () => void;
|
|
22
|
-
onFinally(ctx: OperationLoggerContext): () => void;
|
|
23
|
-
stageLog(ctx: OperationLoggerContext): () => void;
|
|
24
|
-
shouldLogDefault(_ctx: OperationLoggerContext): boolean;
|
|
25
|
-
getOperationLogMessages(ctx: OperationLoggerContext): string[];
|
|
26
|
-
getOperationTryMessage(ctx: OperationLoggerContext): string;
|
|
27
|
-
getOperationName<TContext extends OperationDecoratorContext>(ctx: TContext, fullPath?: boolean, separator?: string): string;
|
|
28
|
-
getOperationCompletedMessage(ctx: OperationLoggerContext): string;
|
|
29
|
-
getOperationErrorDetails(error: TrackedError, ctx: OperationLoggerContext): string[];
|
|
30
|
-
getErrorMessage(error: unknown, _ctx?: OperationLoggerContext): string;
|
|
31
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationLogger = void 0;
|
|
4
|
-
const OperationTree_1 = require("./OperationTree");
|
|
5
|
-
const OperationDecorator_1 = require("./OperationDecorator");
|
|
6
|
-
class OperationLogger {
|
|
7
|
-
static getTryCatchFinallyHook(_ctx) {
|
|
8
|
-
throw new Error('OperationLogger.getTryCatchFinallyHook is abstract and must be implemented by derived class');
|
|
9
|
-
}
|
|
10
|
-
onTry(ctx) {
|
|
11
|
-
return this.stageLog(ctx);
|
|
12
|
-
}
|
|
13
|
-
onFinally(ctx) {
|
|
14
|
-
return this.stageLog(ctx);
|
|
15
|
-
}
|
|
16
|
-
stageLog(ctx) {
|
|
17
|
-
if (!ctx.sharedContext.logs)
|
|
18
|
-
ctx.sharedContext.logs = [];
|
|
19
|
-
if (!ctx.logs)
|
|
20
|
-
ctx.logs = [];
|
|
21
|
-
const stageLogMessages = this.getOperationLogMessages(ctx);
|
|
22
|
-
if (stageLogMessages)
|
|
23
|
-
ctx.logs.push(...stageLogMessages);
|
|
24
|
-
return () => {
|
|
25
|
-
let shouldLog = ctx.decoratorArgs?.shouldLog?.(ctx);
|
|
26
|
-
if (shouldLog === undefined)
|
|
27
|
-
shouldLog = this.shouldLogDefault(ctx);
|
|
28
|
-
if (shouldLog) {
|
|
29
|
-
const fullLogMessage = (ctx.logs || [])
|
|
30
|
-
.concat(...(ctx.sharedContext.logs || []))
|
|
31
|
-
.filter((t) => t)
|
|
32
|
-
.join('. ');
|
|
33
|
-
const logDetails = ctx.logMetadata || ctx.sharedContext.logMetadata
|
|
34
|
-
? { ...ctx.sharedContext.logMetadata, ...ctx.logMetadata }
|
|
35
|
-
: undefined;
|
|
36
|
-
if (ctx.error)
|
|
37
|
-
this.logError(fullLogMessage, { error: ctx.error, ...logDetails });
|
|
38
|
-
else
|
|
39
|
-
this.logInfo(fullLogMessage, logDetails);
|
|
40
|
-
}
|
|
41
|
-
ctx.logs.length = 0;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
shouldLogDefault(_ctx) {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
getOperationLogMessages(ctx) {
|
|
48
|
-
const res = [];
|
|
49
|
-
switch (ctx.stage) {
|
|
50
|
-
case 'try':
|
|
51
|
-
res.push(this.getOperationTryMessage(ctx));
|
|
52
|
-
break;
|
|
53
|
-
case 'finally':
|
|
54
|
-
res.push(this.getOperationCompletedMessage(ctx));
|
|
55
|
-
if (ctx.error) {
|
|
56
|
-
const error = ctx.error;
|
|
57
|
-
res.push(...(this.getOperationErrorDetails(error, ctx) || []));
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
return res;
|
|
64
|
-
}
|
|
65
|
-
getOperationTryMessage(ctx) {
|
|
66
|
-
return `${this.getOperationName(ctx)} starting...`;
|
|
67
|
-
}
|
|
68
|
-
getOperationName(ctx, fullPath = true, separator = ' > ') {
|
|
69
|
-
if (!fullPath)
|
|
70
|
-
return OperationDecorator_1.OperationDecorator.getOperationName(ctx) || '(anonymous)';
|
|
71
|
-
const fullOperationName = OperationTree_1.OperationTree.getOperationsStack(ctx)
|
|
72
|
-
.map((op) => this.getOperationName(op, false))
|
|
73
|
-
.join(separator);
|
|
74
|
-
return fullOperationName;
|
|
75
|
-
}
|
|
76
|
-
getOperationCompletedMessage(ctx) {
|
|
77
|
-
const hasError = !!ctx.error;
|
|
78
|
-
const fullOperationName = this.getOperationName(ctx);
|
|
79
|
-
const duration = ctx.duration;
|
|
80
|
-
if (duration !== undefined)
|
|
81
|
-
return `${fullOperationName} ${hasError ? 'failed' : 'succeeded'} after ${duration} ms`;
|
|
82
|
-
else
|
|
83
|
-
return `${fullOperationName} ${hasError ? 'failed' : 'succeeded'}`;
|
|
84
|
-
}
|
|
85
|
-
getOperationErrorDetails(error, ctx) {
|
|
86
|
-
const errorContext = error.trackedContext;
|
|
87
|
-
const logMessages = [];
|
|
88
|
-
logMessages.push(this.getErrorMessage(error, ctx));
|
|
89
|
-
if (errorContext == ctx && error.underlyingError) {
|
|
90
|
-
logMessages.push(`Underlying error: ${this.getErrorMessage(error.underlyingError, ctx)}`);
|
|
91
|
-
}
|
|
92
|
-
return logMessages;
|
|
93
|
-
}
|
|
94
|
-
getErrorMessage(error, _ctx) {
|
|
95
|
-
if (error instanceof Error) {
|
|
96
|
-
const trError = error;
|
|
97
|
-
const errorClass = trError?.constructor?.name;
|
|
98
|
-
return `${errorClass || '[undefined]'}: ${trError.message}`;
|
|
99
|
-
}
|
|
100
|
-
return error?.toString?.() || 'unknown error';
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports.OperationLogger = OperationLogger;
|
|
104
|
-
//# sourceMappingURL=OperationLogger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Oper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CAAC,eAAe,EAAE;YAChD,WAAW,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;SAC1F;QACD,OAAO,WAAW,CAAA;IACpB,CAAC;IAQD,eAAe,CAAC,KAAc,EAAE,IAA6B;QAC3D,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,OAAO,GAAG,KAAqB,CAAA;YACrC,MAAM,UAAU,GAAG,OAAO,EAAE,WAAW,EAAE,IAAI,CAAA;YAC7C,OAAO,GAAG,UAAU,IAAI,aAAa,KAAK,OAAO,CAAC,OAAO,EAAE,CAAA;SAC5D;QAED,OAAQ,KAAe,EAAE,QAAQ,EAAE,EAAE,IAAI,eAAe,CAAA;IAC1D,CAAC;CACF;AAtJD,0CAsJC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TrackedError } from './TrackedError';
|
|
2
|
-
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
3
|
-
export declare type OperationStatsContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
4
|
-
tags: string[];
|
|
5
|
-
sharedContext: {
|
|
6
|
-
tags: string[];
|
|
7
|
-
};
|
|
8
|
-
decoratorArgs?: {
|
|
9
|
-
shouldStats?: (args: OperationStatsEventArgs) => boolean | void;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare abstract class OperationStats<TContext extends OperationStatsContext = OperationStatsContext> implements TryCatchFinallyHook<TContext> {
|
|
13
|
-
static getTryCatchFinallyHook(_ctx: OperationStatsContext): TryCatchFinallyHook<OperationStatsContext>;
|
|
14
|
-
abstract stats(args: StatsArgs): void;
|
|
15
|
-
getMetricName(ctx: OperationStatsContext): string | undefined;
|
|
16
|
-
onTry(ctx: OperationStatsContext): () => void;
|
|
17
|
-
mergeTags(...tagSets: (string[] | undefined)[]): string[];
|
|
18
|
-
statsOperationEvent(args: OperationStatsEventArgs): void;
|
|
19
|
-
onCatch(ctx: OperationStatsContext): void;
|
|
20
|
-
onFinally(ctx: OperationStatsContext): () => void;
|
|
21
|
-
getHistogramMetric(ctx: OperationStatsContext): string | undefined;
|
|
22
|
-
extractTagsFromError(error: TrackedError, ctx: OperationStatsContext): string[];
|
|
23
|
-
getErrorOperationNameTag(error: TrackedError, ctx: OperationStatsContext): string | undefined;
|
|
24
|
-
getOperationNameTag(ctx: OperationStatsContext): string | undefined;
|
|
25
|
-
}
|
|
26
|
-
export declare type StatsMethod = 'incr' | 'histogram' | 'set';
|
|
27
|
-
export declare type StatsArgs = {
|
|
28
|
-
method?: StatsMethod;
|
|
29
|
-
metric: string;
|
|
30
|
-
value?: number;
|
|
31
|
-
tags?: string[];
|
|
32
|
-
};
|
|
33
|
-
export declare type OperationStatsEvent = OperationStatsContext['stage'] | 'duration';
|
|
34
|
-
export interface OperationStatsEventArgs {
|
|
35
|
-
event: OperationStatsEvent;
|
|
36
|
-
context: OperationStatsContext;
|
|
37
|
-
stats: StatsArgs;
|
|
38
|
-
shouldStats: boolean;
|
|
39
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationStats = void 0;
|
|
4
|
-
const OperationDuration_1 = require("./OperationDuration");
|
|
5
|
-
const OperationDecorator_1 = require("./OperationDecorator");
|
|
6
|
-
class OperationStats {
|
|
7
|
-
static getTryCatchFinallyHook(_ctx) {
|
|
8
|
-
throw new Error('OperationStats.getTryCatchFinallyHook is abstract and must be implemented by derived class');
|
|
9
|
-
}
|
|
10
|
-
getMetricName(ctx) {
|
|
11
|
-
const opName = OperationDecorator_1.OperationDecorator.getOperationName(ctx);
|
|
12
|
-
if (!opName)
|
|
13
|
-
return undefined;
|
|
14
|
-
switch (ctx.stage) {
|
|
15
|
-
case 'try':
|
|
16
|
-
return `${opName}.try`;
|
|
17
|
-
case 'catch':
|
|
18
|
-
return `${opName}.catch`;
|
|
19
|
-
case 'finally':
|
|
20
|
-
default:
|
|
21
|
-
return `${opName}`;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
onTry(ctx) {
|
|
25
|
-
ctx.tags = [];
|
|
26
|
-
if (!ctx.sharedContext.tags)
|
|
27
|
-
ctx.sharedContext.tags = [];
|
|
28
|
-
return () => {
|
|
29
|
-
const metricName = this.getMetricName(ctx);
|
|
30
|
-
if (metricName)
|
|
31
|
-
this.statsOperationEvent({
|
|
32
|
-
context: ctx,
|
|
33
|
-
event: 'try',
|
|
34
|
-
shouldStats: false,
|
|
35
|
-
stats: {
|
|
36
|
-
metric: metricName,
|
|
37
|
-
method: 'incr',
|
|
38
|
-
value: 1,
|
|
39
|
-
tags: this.mergeTags(ctx.sharedContext.tags, ctx.tags)
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
mergeTags(...tagSets) {
|
|
45
|
-
const res = [];
|
|
46
|
-
for (const tags of tagSets) {
|
|
47
|
-
if (tags)
|
|
48
|
-
res.push(...tags);
|
|
49
|
-
}
|
|
50
|
-
return res.filter((t) => t);
|
|
51
|
-
}
|
|
52
|
-
statsOperationEvent(args) {
|
|
53
|
-
if (args.context.decoratorArgs?.shouldStats) {
|
|
54
|
-
const shouldStats = args.context.decoratorArgs.shouldStats(args);
|
|
55
|
-
if (shouldStats !== undefined)
|
|
56
|
-
args.shouldStats = shouldStats;
|
|
57
|
-
}
|
|
58
|
-
if (args.shouldStats && args.stats) {
|
|
59
|
-
this.stats(args.stats);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
onCatch(ctx) {
|
|
63
|
-
const metricName = this.getMetricName(ctx);
|
|
64
|
-
if (metricName)
|
|
65
|
-
this.statsOperationEvent({
|
|
66
|
-
context: ctx,
|
|
67
|
-
event: ctx.stage,
|
|
68
|
-
shouldStats: false,
|
|
69
|
-
stats: {
|
|
70
|
-
metric: metricName,
|
|
71
|
-
method: 'incr',
|
|
72
|
-
value: 1,
|
|
73
|
-
tags: this.mergeTags(ctx.sharedContext.tags, ctx.tags)
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
onFinally(ctx) {
|
|
78
|
-
const finallyTags = [];
|
|
79
|
-
if (ctx.stage == 'finally')
|
|
80
|
-
finallyTags.push(`error:${ctx.error ? 'true' : 'false'}`);
|
|
81
|
-
if (ctx.error) {
|
|
82
|
-
const error = ctx.error;
|
|
83
|
-
finallyTags.push(...(this.extractTagsFromError(error, ctx) || []));
|
|
84
|
-
}
|
|
85
|
-
ctx.tags.push(...finallyTags);
|
|
86
|
-
return () => {
|
|
87
|
-
const finallyTags = this.mergeTags(ctx.sharedContext.tags, ctx.tags);
|
|
88
|
-
const metricName = this.getMetricName(ctx);
|
|
89
|
-
if (metricName)
|
|
90
|
-
this.statsOperationEvent({
|
|
91
|
-
context: ctx,
|
|
92
|
-
event: 'finally',
|
|
93
|
-
shouldStats: true,
|
|
94
|
-
stats: { metric: metricName, method: 'incr', value: 1, tags: [...finallyTags] }
|
|
95
|
-
});
|
|
96
|
-
const duration = OperationDuration_1.OperationDuration.getDuration(ctx);
|
|
97
|
-
const histogramMetric = this.getHistogramMetric(ctx);
|
|
98
|
-
if (duration !== undefined && histogramMetric)
|
|
99
|
-
this.statsOperationEvent({
|
|
100
|
-
context: ctx,
|
|
101
|
-
event: 'duration',
|
|
102
|
-
shouldStats: true,
|
|
103
|
-
stats: { metric: histogramMetric, method: 'histogram', value: duration, tags: [...finallyTags] }
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
getHistogramMetric(ctx) {
|
|
108
|
-
const opName = OperationDecorator_1.OperationDecorator.getOperationName(ctx);
|
|
109
|
-
if (!opName)
|
|
110
|
-
return undefined;
|
|
111
|
-
return `${opName}.duration`;
|
|
112
|
-
}
|
|
113
|
-
extractTagsFromError(error, ctx) {
|
|
114
|
-
const res = [];
|
|
115
|
-
const errorOperation = this.getErrorOperationNameTag(error, ctx);
|
|
116
|
-
if (errorOperation)
|
|
117
|
-
res.push(`error_operation:${errorOperation}`);
|
|
118
|
-
res.push(`error_class:${error?.constructor?.name || typeof error}`);
|
|
119
|
-
return res;
|
|
120
|
-
}
|
|
121
|
-
getErrorOperationNameTag(error, ctx) {
|
|
122
|
-
const errorContext = error.trackedContext;
|
|
123
|
-
return errorContext ? this.getOperationNameTag(errorContext) : this.getOperationNameTag(ctx);
|
|
124
|
-
}
|
|
125
|
-
getOperationNameTag(ctx) {
|
|
126
|
-
return OperationDecorator_1.OperationDecorator.getOperationName(ctx);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.OperationStats = OperationStats;
|
|
130
|
-
//# sourceMappingURL=OperationStats.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationStats.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationStats.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAEvD,6DAAyD;AA0BzD,MAAsB,cAAc;IAGlC,MAAM,CAAC,sBAAsB,CAAC,IAA2B;QACvD,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAA;IAC/G,CAAC;IAGD,aAAa,CAAC,GAA0B;QACtC,MAAM,MAAM,GAAG,uCAAkB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAA;QACvD,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAA;QAE7B,QAAQ,GAAG,CAAC,KAAK,EAAE;YACjB,KAAK,KAAK;gBACR,OAAO,GAAG,MAAM,MAAM,CAAA;YACxB,KAAK,OAAO;gBACV,OAAO,GAAG,MAAM,QAAQ,CAAA;YAC1B,KAAK,SAAS,CAAC;YACf;gBACE,OAAO,GAAG,MAAM,EAAE,CAAA;SACrB;IACH,CAAC;IAED,KAAK,CAAC,GAA0B;QAC9B,GAAG,CAAC,IAAI,GAAG,EAA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