@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,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.MessageSendPerformer = exports.SendabilityStatus = void 0;
|
|
10
|
-
const EngageActionPerformer_1 = require("./EngageActionPerformer");
|
|
11
|
-
const isRetryableError_1 = require("./isRetryableError");
|
|
12
|
-
const AggregateError_1 = require("./AggregateError");
|
|
13
|
-
const getProfileApiEndpoint_1 = require("./getProfileApiEndpoint");
|
|
14
|
-
const track_1 = require("./track");
|
|
15
|
-
const actions_core_1 = require("@segment/actions-core");
|
|
16
|
-
var SendabilityStatus;
|
|
17
|
-
(function (SendabilityStatus) {
|
|
18
|
-
SendabilityStatus["ShouldSend"] = "should_send";
|
|
19
|
-
SendabilityStatus["NotSubscribed"] = "not_subscribed";
|
|
20
|
-
SendabilityStatus["NoSupportedExternalIds"] = "no_supported_ids";
|
|
21
|
-
SendabilityStatus["InvalidSubscriptionStatus"] = "invalid_subscription_status";
|
|
22
|
-
SendabilityStatus["SendDisabled"] = "send_disabled";
|
|
23
|
-
})(SendabilityStatus = exports.SendabilityStatus || (exports.SendabilityStatus = {}));
|
|
24
|
-
class MessageSendPerformer extends EngageActionPerformer_1.EngageActionPerformer {
|
|
25
|
-
async doPerform() {
|
|
26
|
-
const res = this.forAllRecepients((recepient) => this.sendToRecepient(recepient));
|
|
27
|
-
if (this.executeInput.features) {
|
|
28
|
-
this.logInfo('Feature flags:' + JSON.stringify(this.executeInput.features));
|
|
29
|
-
}
|
|
30
|
-
this.statsEventDeliveryTs();
|
|
31
|
-
return res;
|
|
32
|
-
}
|
|
33
|
-
getStaticMembersOfThisClass() {
|
|
34
|
-
return this.constructor;
|
|
35
|
-
}
|
|
36
|
-
isExternalIdSubscribed(extId) {
|
|
37
|
-
const staticMems = this.getStaticMembersOfThisClass();
|
|
38
|
-
const subStatus = extId.subscriptionStatus?.toString()?.toLowerCase();
|
|
39
|
-
const isOptOutModel = this.payload.sendBasedOnOptOut ? true : false;
|
|
40
|
-
if (!subStatus)
|
|
41
|
-
return isOptOutModel;
|
|
42
|
-
if (staticMems.sendableStatuses.includes(subStatus))
|
|
43
|
-
return true;
|
|
44
|
-
if (staticMems.nonSendableStatuses.includes(subStatus))
|
|
45
|
-
return false;
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
convertSubscriptionStatusText(subVal) {
|
|
49
|
-
if (subVal == undefined) {
|
|
50
|
-
return 'unknown';
|
|
51
|
-
}
|
|
52
|
-
if (subVal == '') {
|
|
53
|
-
return 'did_not_subscribe';
|
|
54
|
-
}
|
|
55
|
-
return subVal;
|
|
56
|
-
}
|
|
57
|
-
getSendabilityPayload() {
|
|
58
|
-
if (!this.payload.send) {
|
|
59
|
-
return { sendabilityStatus: SendabilityStatus.SendDisabled };
|
|
60
|
-
}
|
|
61
|
-
const supportedExtIdsWithSub = this.payload.externalIds
|
|
62
|
-
?.filter((extId) => this.isSupportedExternalId(extId))
|
|
63
|
-
.map((extId) => ({
|
|
64
|
-
extId,
|
|
65
|
-
isSubscribed: this.isExternalIdSubscribed(extId)
|
|
66
|
-
}));
|
|
67
|
-
this.payload.sendBasedOnOptOut
|
|
68
|
-
? this.currentOperation?.tags.push('SubscriptionOptOutType:' + true)
|
|
69
|
-
: this.currentOperation?.tags.push('SubscriptionOptOutType:' + false);
|
|
70
|
-
if (!supportedExtIdsWithSub || !supportedExtIdsWithSub.length)
|
|
71
|
-
return {
|
|
72
|
-
sendabilityStatus: SendabilityStatus.NoSupportedExternalIds
|
|
73
|
-
};
|
|
74
|
-
this.currentOperation?.tags.push('subscription_status:' + this.convertSubscriptionStatusText(supportedExtIdsWithSub[0]?.extId?.subscriptionStatus));
|
|
75
|
-
const invalidSubStatuses = supportedExtIdsWithSub.filter((e) => e.isSubscribed === undefined).map((e) => e.extId);
|
|
76
|
-
const shouldSendExtIds = supportedExtIdsWithSub.filter((e) => e.isSubscribed === true).map((e) => e.extId);
|
|
77
|
-
if (!shouldSendExtIds.length) {
|
|
78
|
-
return invalidSubStatuses.length == 0
|
|
79
|
-
? {
|
|
80
|
-
sendabilityStatus: SendabilityStatus.NotSubscribed
|
|
81
|
-
}
|
|
82
|
-
: {
|
|
83
|
-
sendabilityStatus: SendabilityStatus.InvalidSubscriptionStatus,
|
|
84
|
-
invalid: invalidSubStatuses
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
if (shouldSendExtIds.length) {
|
|
88
|
-
const subWithIds = shouldSendExtIds.filter((extId) => extId.id);
|
|
89
|
-
return {
|
|
90
|
-
sendabilityStatus: subWithIds.length > 0 ? SendabilityStatus.ShouldSend : SendabilityStatus.NoSupportedExternalIds,
|
|
91
|
-
recepients: subWithIds.length > 0 ? subWithIds : shouldSendExtIds,
|
|
92
|
-
invalid: invalidSubStatuses
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
if (invalidSubStatuses.length)
|
|
96
|
-
return {
|
|
97
|
-
sendabilityStatus: SendabilityStatus.InvalidSubscriptionStatus,
|
|
98
|
-
invalid: invalidSubStatuses
|
|
99
|
-
};
|
|
100
|
-
return {
|
|
101
|
-
sendabilityStatus: SendabilityStatus.NoSupportedExternalIds,
|
|
102
|
-
recepients: supportedExtIdsWithSub.map((e) => e.extId)
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
getRecepients() {
|
|
106
|
-
const sendabilityPayload = this.getSendabilityPayload();
|
|
107
|
-
const shouldSend = sendabilityPayload.sendabilityStatus === SendabilityStatus.ShouldSend;
|
|
108
|
-
this.currentOperation?.tags.push('sendability_status:' + sendabilityPayload.sendabilityStatus);
|
|
109
|
-
this.currentOperation?.logs.push(shouldSend
|
|
110
|
-
? `Sending message to recepients (${sendabilityPayload.recepients?.length}): ${sendabilityPayload.recepients
|
|
111
|
-
?.map((r) => this.redactPii(r.id))
|
|
112
|
-
.join(', ')}})`
|
|
113
|
-
: `Not sending message because ${sendabilityPayload.sendabilityStatus?.toUpperCase()}. Recepients (${sendabilityPayload.recepients?.length})`);
|
|
114
|
-
return sendabilityPayload.sendabilityStatus == SendabilityStatus.ShouldSend
|
|
115
|
-
? sendabilityPayload.recepients || []
|
|
116
|
-
: [];
|
|
117
|
-
}
|
|
118
|
-
beforePerform() {
|
|
119
|
-
if (!this.settings.region && this.getDefaultSettingsRegion) {
|
|
120
|
-
this.settings.region = this.getDefaultSettingsRegion();
|
|
121
|
-
}
|
|
122
|
-
Object.assign(this.logDetails, {
|
|
123
|
-
externalIds: this.payload.externalIds?.map((eid) => ({ ...eid, id: this.redactPii(eid.id) })),
|
|
124
|
-
shouldSend: this.payload.send,
|
|
125
|
-
settings_region: this.settings.region,
|
|
126
|
-
sourceId: this.settings.sourceId,
|
|
127
|
-
spaceId: this.settings.spaceId,
|
|
128
|
-
messageId: this.executeInput['rawData']?.messageId,
|
|
129
|
-
channelType: this.getChannelType()
|
|
130
|
-
});
|
|
131
|
-
if ('userId' in this.payload)
|
|
132
|
-
this.logDetails.userId = this.payload.userId;
|
|
133
|
-
if (this.executeInput.statsContext?.tags) {
|
|
134
|
-
for (const item of this.executeInput.statsContext?.tags) {
|
|
135
|
-
if (item.includes('delivery_attempt') || item.includes('replay')) {
|
|
136
|
-
this.logDetails[item.split(':')[0]] = item.split(':')[1];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
statsEventDeliveryTs() {
|
|
142
|
-
const eventOccurredTS = this.payload?.eventOccurredTS;
|
|
143
|
-
if (typeof eventOccurredTS === 'number') {
|
|
144
|
-
this.statsHistogram('eventDeliveryTS', Date.now() - new Date(eventOccurredTS).getTime());
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
async forAllRecepients(sendToRecepient) {
|
|
148
|
-
const recepients = this.getRecepients();
|
|
149
|
-
await this.beforeSend?.(recepients);
|
|
150
|
-
const results = (await Promise.allSettled(recepients.map((recepient) => sendToRecepient(recepient)))).map((r, i) => ({
|
|
151
|
-
recepient: recepients[i],
|
|
152
|
-
status: r.status,
|
|
153
|
-
...(r.status === 'rejected' ? { error: r.reason } : { result: r.value })
|
|
154
|
-
}));
|
|
155
|
-
return this.aggregateSendResults(results);
|
|
156
|
-
}
|
|
157
|
-
aggregateSendResults(sendResults) {
|
|
158
|
-
if (!sendResults.length) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (sendResults.length === 1) {
|
|
162
|
-
if (sendResults[0].status === 'rejected') {
|
|
163
|
-
throw sendResults[0].error;
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
return sendResults[0].result;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
const fulfilled = sendResults.filter((sr) => sr.status === 'fulfilled');
|
|
170
|
-
if (fulfilled.length) {
|
|
171
|
-
return fulfilled.map((sr) => sr.result);
|
|
172
|
-
}
|
|
173
|
-
const rejected = sendResults.filter((sr) => sr.status === 'rejected');
|
|
174
|
-
if (rejected.every((r) => isRetryableError_1.isRetryableError(r.error))) {
|
|
175
|
-
throw AggregateError_1.AggregateError.create({
|
|
176
|
-
errors: rejected.map((r) => r.error),
|
|
177
|
-
message: (msg) => 'Failed to send to all subscribed recepients (retryable):' + msg
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
const firstNonRetryable = rejected.find((r) => !isRetryableError_1.isRetryableError(r.error))?.error;
|
|
181
|
-
throw AggregateError_1.AggregateError.create({
|
|
182
|
-
errors: rejected.map((r) => r.error),
|
|
183
|
-
takeCodeAndStatusFromError: firstNonRetryable,
|
|
184
|
-
message: (msg) => 'Failed to send to all subscribed recepients (non-retryable):' + msg
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
async getProfileTraits() {
|
|
188
|
-
if (this.payload.traitEnrichment)
|
|
189
|
-
return this.payload?.traits || {};
|
|
190
|
-
if (!this.payload.userId) {
|
|
191
|
-
throw new actions_core_1.PayloadValidationError('No userId provided and no traits provided');
|
|
192
|
-
}
|
|
193
|
-
const endpoint = getProfileApiEndpoint_1.getProfileApiEndpoint(this.settings.profileApiEnvironment, this.settings.region);
|
|
194
|
-
const encodedProfileId = encodeURIComponent(this.payload.userId);
|
|
195
|
-
const response = await this.request(`${endpoint}/v1/spaces/${this.settings.spaceId}/collections/users/profiles/user_id:${encodedProfileId}/traits?limit=200`, {
|
|
196
|
-
headers: {
|
|
197
|
-
authorization: `Basic ${Buffer.from(this.settings.profileApiAccessToken + ':').toString('base64')}`,
|
|
198
|
-
'content-type': 'application/json'
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
const body = await response.json();
|
|
202
|
-
return body.traits;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
MessageSendPerformer.nonSendableStatuses = ['unsubscribed', 'false'];
|
|
206
|
-
MessageSendPerformer.sendableStatuses = ['subscribed', 'true'];
|
|
207
|
-
__decorate([
|
|
208
|
-
track_1.track()
|
|
209
|
-
], MessageSendPerformer.prototype, "getProfileTraits", null);
|
|
210
|
-
exports.MessageSendPerformer = MessageSendPerformer;
|
|
211
|
-
//# sourceMappingURL=MessageSendPerformer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageSendPerformer.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/MessageSendPerformer.ts"],"names":[],"mappings":";;;;;;;;;AAGA,mEAA+D;AAC/D,yDAAqD;AACrD,qDAAiD;AAEjD,mEAAuE;AACvE,mCAA+B;AAC/B,wDAA8D;AAE9D,IAAY,iBAqBX;AArBD,WAAY,iBAAiB;IAI3B,+CAA0B,CAAA;IAI1B,qDAAgC,CAAA;IAIhC,gEAA2C,CAAA;IAI3C,8EAAyD,CAAA;IAIzD,mDAA8B,CAAA;AAChC,CAAC,EArBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAqB5B;AAyDD,MAAsB,oBAGpB,SAAQ,6CAA0C;IAClD,KAAK,CAAC,SAAS;QAEb,MAAM,GAAG,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAA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CAAuC,gBAAgB,mBAAmB,EACxH;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;gBACnG,cAAc,EAAE,kBAAkB;aACnC;SACF,CACF,CAAA;QACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QAClC,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;;AAhQe,wCAAmB,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;AAC/C,qCAAgB,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AA2OzD;IADC,aAAK,EAAE;4DAqBP;AAxRH,oDAyRC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/Profile.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { HTTPError } from '@segment/actions-core/request-client';
|
|
2
|
-
export interface ResponseError extends HTTPError {
|
|
3
|
-
response: HTTPError['response'] & {
|
|
4
|
-
data: {
|
|
5
|
-
code: string | number;
|
|
6
|
-
message: string;
|
|
7
|
-
more_info: string;
|
|
8
|
-
status?: number;
|
|
9
|
-
statusCode?: number;
|
|
10
|
-
errors?: {
|
|
11
|
-
message: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
headers?: Response['headers'];
|
|
15
|
-
};
|
|
16
|
-
code?: string;
|
|
17
|
-
status?: number;
|
|
18
|
-
retry?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ErrorDetails {
|
|
21
|
-
message: string;
|
|
22
|
-
code: string;
|
|
23
|
-
status?: number;
|
|
24
|
-
}
|
|
25
|
-
export declare function getErrorDetails(error: any): ErrorDetails;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getErrorDetails = void 0;
|
|
4
|
-
function getErrorDetails(error) {
|
|
5
|
-
const respError = error;
|
|
6
|
-
const status = respError.status || respError.response?.status;
|
|
7
|
-
const code = respError.code || respError.response?.data?.code;
|
|
8
|
-
const message = [
|
|
9
|
-
respError.name || respError.constructor?.name,
|
|
10
|
-
respError.message,
|
|
11
|
-
respError.response?.statusText && !respError.message.includes(respError.response?.statusText)
|
|
12
|
-
? respError.response?.statusText
|
|
13
|
-
: undefined,
|
|
14
|
-
respError?.response?.data?.message,
|
|
15
|
-
respError?.response?.data?.errors?.[0]?.message
|
|
16
|
-
]
|
|
17
|
-
.filter(Boolean)
|
|
18
|
-
.join('; ');
|
|
19
|
-
return { status, code: code?.toString(), message };
|
|
20
|
-
}
|
|
21
|
-
exports.getErrorDetails = getErrorDetails;
|
|
22
|
-
//# sourceMappingURL=ResponseError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseError.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/ResponseError.ts"],"names":[],"mappings":";;;AA4BA,SAAgB,eAAe,CAAC,KAAU;IAGxC,MAAM,SAAS,GAAG,KAAsB,CAAA;IAGxC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAA;IAI7D,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAA;IAE7D,MAAM,OAAO,GAAG;QACd,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,WAAW,EAAE,IAAI;QAC7C,SAAS,CAAC,OAAO;QACjB,SAAS,CAAC,QAAQ,EAAE,UAAU,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC;YAC3F,CAAC,CAAC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QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,GAAG,EAAE;QACH,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,QAAQ;KACf;IACD,OAAO,EAAE;QACP,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,QAAQ;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,mEAAmE;QAChF,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACf;IACD,2BAA2B,EAAE;QAC3B,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,iJAAiJ;QACnJ,IAAI,EAAE,SAAS;KAChB;CACF,CAAA;AAEY,QAAA,kBAAkB,GAAG,WAAW,CAAA;AAEhC,QAAA,sBAAsB,GAAG,sBAAsB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProfileApiEndpoint = void 0;
|
|
4
|
-
const getProfileApiEndpoint = (environment, region) => {
|
|
5
|
-
const domainName = region === 'eu-west-1' ? 'profiles.euw1.segment' : 'profiles.segment';
|
|
6
|
-
const topLevelName = environment === 'production' ? 'com' : 'build';
|
|
7
|
-
return `https://${domainName}.${topLevelName}`;
|
|
8
|
-
};
|
|
9
|
-
exports.getProfileApiEndpoint = getProfileApiEndpoint;
|
|
10
|
-
//# sourceMappingURL=getProfileApiEndpoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getProfileApiEndpoint.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/getProfileApiEndpoint.ts"],"names":[],"mappings":";;;AACO,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAE,MAAe,EAAU,EAAE;IACpF,MAAM,UAAU,GAAG,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,kBAAkB,CAAA;IACxF,MAAM,YAAY,GAAG,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAA;IACnE,OAAO,WAAW,UAAU,IAAI,YAAY,EAAE,CAAA;AAChD,CAAC,CAAA;AAJY,QAAA,qBAAqB,yBAIjC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './EngageActionPerformer';
|
|
2
|
-
export * from './MessageSendPerformer';
|
|
3
|
-
export * from './operationTracking';
|
|
4
|
-
export * from './EngageLogger';
|
|
5
|
-
export * from './EngageStats';
|
|
6
|
-
export * from './track';
|
|
7
|
-
export * from './isDestinationActionService';
|
|
8
|
-
export * from './ResponseError';
|
|
9
|
-
export * from './IntegrationErrorWrapper';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./EngageActionPerformer"), exports);
|
|
14
|
-
__exportStar(require("./MessageSendPerformer"), exports);
|
|
15
|
-
__exportStar(require("./operationTracking"), exports);
|
|
16
|
-
__exportStar(require("./EngageLogger"), exports);
|
|
17
|
-
__exportStar(require("./EngageStats"), exports);
|
|
18
|
-
__exportStar(require("./track"), exports);
|
|
19
|
-
__exportStar(require("./isDestinationActionService"), exports);
|
|
20
|
-
__exportStar(require("./ResponseError"), exports);
|
|
21
|
-
__exportStar(require("./IntegrationErrorWrapper"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAuC;AACvC,yDAAsC;AACtC,sDAAmC;AACnC,iDAA8B;AAC9B,gDAA6B;AAC7B,0CAAuB;AACvB,+DAA4C;AAC5C,kDAA+B;AAC/B,4DAAyC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isDestinationActionService(): boolean;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDestinationActionService = void 0;
|
|
4
|
-
function isDestinationActionService() {
|
|
5
|
-
return (process.env.DESTINATIONS_ACTION_SERVICE === 'true' || process.env.SERVICE_NAME === 'destination-actions-service');
|
|
6
|
-
}
|
|
7
|
-
exports.isDestinationActionService = isDestinationActionService;
|
|
8
|
-
//# sourceMappingURL=isDestinationActionService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isDestinationActionService.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/isDestinationActionService.ts"],"names":[],"mappings":";;;AAAA,SAAgB,0BAA0B;IAExC,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,6BAA6B,CACjH,CAAA;AACH,CAAC;AALD,gEAKC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRetryableStatus = exports.isRetryableError = void 0;
|
|
4
|
-
const ResponseError_1 = require("./ResponseError");
|
|
5
|
-
function isRetryableError(error) {
|
|
6
|
-
return isRetryableStatus(ResponseError_1.getErrorDetails(error).status);
|
|
7
|
-
}
|
|
8
|
-
exports.isRetryableError = isRetryableError;
|
|
9
|
-
function isRetryableStatus(status) {
|
|
10
|
-
let result = true;
|
|
11
|
-
const statusGroup = status === undefined ? undefined : Math.floor(status / 100);
|
|
12
|
-
switch (statusGroup) {
|
|
13
|
-
case 2:
|
|
14
|
-
case 4:
|
|
15
|
-
result = false;
|
|
16
|
-
break;
|
|
17
|
-
default:
|
|
18
|
-
result = true;
|
|
19
|
-
}
|
|
20
|
-
switch (status) {
|
|
21
|
-
case 408:
|
|
22
|
-
case 423:
|
|
23
|
-
case 429:
|
|
24
|
-
result = true;
|
|
25
|
-
break;
|
|
26
|
-
case 501:
|
|
27
|
-
result = false;
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
return result;
|
|
31
|
-
}
|
|
32
|
-
exports.isRetryableStatus = isRetryableStatus;
|
|
33
|
-
//# sourceMappingURL=isRetryableError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isRetryableError.js","sourceRoot":"","sources":["../../../../src/destinations/engage/utils/isRetryableError.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAGjD,SAAgB,gBAAgB,CAAC,KAAU;IACzC,OAAO,iBAAiB,CAAC,+BAAe,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AACzD,CAAC;AAFD,4CAEC;AAED,SAAgB,iBAAiB,CAAC,MAAe;IAE/C,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,MAAM,WAAW,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,CAAA;IAC/E,QAAQ,WAAW,EAAE;QACnB,KAAK,CAAC,CAAC;QACP,KAAK,CAAC;YACJ,MAAM,GAAG,KAAK,CAAA;YACd,MAAK;QACP;YAEE,MAAM,GAAG,IAAI,CAAA;KAChB;IACD,QAAQ,MAAM,EAAE;QACd,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,GAAG;YACN,MAAM,GAAG,IAAI,CAAA;YACb,MAAK;QACP,KAAK,GAAG;YACN,MAAM,GAAG,KAAK,CAAA;YACd,MAAK;KAGR;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AA1BD,8CA0BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type GenericMethodDecorator<TFunc extends (this: any, ...args: any[]) => any = (this: any, ...args: any) => any> = (target: ThisParameterType<TFunc>, propertyKey: string, descriptor: TypedPropertyDescriptor<TFunc>) => TypedPropertyDescriptor<TFunc> | void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GenericMethodDecorator.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/GenericMethodDecorator.ts"],"names":[],"mappings":""}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { GenericMethodDecorator } from './GenericMethodDecorator';
|
|
2
|
-
import { OperationDuration } from './OperationDuration';
|
|
3
|
-
import { OperationErrorHandler } from './OperationErrorHandler';
|
|
4
|
-
import { OperationFinallyHooks } from './OperationFinallyHooks';
|
|
5
|
-
import { OperationTree } from './OperationTree';
|
|
6
|
-
import { FuncFromTryCatchFinallyContext, TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
7
|
-
export interface DecoratorArgs {
|
|
8
|
-
operation?: string;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export declare type OperationHookContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext, TDecoratorArgs extends DecoratorArgs = DecoratorArgs> = TContext & {
|
|
12
|
-
decoratorArgs?: TDecoratorArgs;
|
|
13
|
-
};
|
|
14
|
-
export interface OperationHookProvider<TContext extends OperationHookContext = OperationHookContext, TDecoratorUtils = {}> {
|
|
15
|
-
getTryCatchFinallyHook(ctx: TContext): TryCatchFinallyHook<TContext>;
|
|
16
|
-
getDecoratorUtils?(): TDecoratorUtils;
|
|
17
|
-
}
|
|
18
|
-
export declare type UnionToIntersection<TUnion> = (TUnion extends any ? (k: TUnion) => void : never) extends (k: infer I) => void ? I : never;
|
|
19
|
-
export declare type ContextFromHookProviders<TProviders extends OperationHookProvider[]> = TProviders extends OperationHookProvider<infer TContext>[] ? UnionToIntersection<TContext> : TryCatchFinallyContext;
|
|
20
|
-
export declare type DecoratorArgsFromContext<TContext extends TryCatchFinallyContext> = TContext extends {
|
|
21
|
-
decoratorArgs?: infer TDecoratorArgs;
|
|
22
|
-
} ? TDecoratorArgs : DecoratorArgs;
|
|
23
|
-
export declare type DecoratorArgsFromHookProviders<TProviders extends OperationHookProvider[]> = DecoratorArgsFromContext<ContextFromHookProviders<TProviders>>;
|
|
24
|
-
export declare type DecoratorUtilsFromHookProviders<TProviders extends OperationHookProvider[]> = TProviders extends OperationHookProvider<any, infer TDecoratorUtils>[] ? UnionToIntersection<TDecoratorUtils> : {};
|
|
25
|
-
export declare type FuncFromHookProviders<TProviders extends OperationHookProvider[]> = FuncFromTryCatchFinallyContext<ContextFromHookProviders<TProviders>>;
|
|
26
|
-
export declare class OperationDecorator {
|
|
27
|
-
static createDecoratorFactory<TOperationHookProviders extends OperationHookProvider[]>(...hookProviders: TOperationHookProviders): ((decoratorArgs?: DecoratorArgsFromHookProviders<TOperationHookProviders>) => GenericMethodDecorator<FuncFromHookProviders<TOperationHookProviders>>) & DecoratorUtilsFromHookProviders<TOperationHookProviders> & {
|
|
28
|
-
_contextType: ContextFromHookProviders<TOperationHookProviders>;
|
|
29
|
-
};
|
|
30
|
-
static createDecoratorFactoryWithDefault<TOperationHookProviders extends OperationHookProvider[]>(...customHookProviders: TOperationHookProviders): ((decoratorArgs?: DecoratorArgsFromContext<ContextFromHookProviders<[typeof OperationErrorHandler, typeof OperationTree, typeof OperationDuration, typeof OperationFinallyHooks, ...TOperationHookProviders]>> | undefined) => GenericMethodDecorator<FuncFromTryCatchFinallyContext<ContextFromHookProviders<[typeof OperationErrorHandler, typeof OperationTree, typeof OperationDuration, typeof OperationFinallyHooks, ...TOperationHookProviders]>>>) & DecoratorUtilsFromHookProviders<[typeof OperationErrorHandler, typeof OperationTree, typeof OperationDuration, typeof OperationFinallyHooks, ...TOperationHookProviders]> & {
|
|
31
|
-
_contextType: ContextFromHookProviders<[typeof OperationErrorHandler, typeof OperationTree, typeof OperationDuration, typeof OperationFinallyHooks, ...TOperationHookProviders]>;
|
|
32
|
-
};
|
|
33
|
-
static getOperationName<TContext extends TryCatchFinallyContext>(ctx: TContext): string | undefined;
|
|
34
|
-
}
|
|
35
|
-
export declare type OperationDecoratorContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
36
|
-
decoratorOf?: {
|
|
37
|
-
classProto: any;
|
|
38
|
-
methodName: string;
|
|
39
|
-
descriptor: TypedPropertyDescriptor<any>;
|
|
40
|
-
originalMethod: FuncFromTryCatchFinallyContext<TContext>;
|
|
41
|
-
};
|
|
42
|
-
decoratorArgs?: DecoratorArgsFromContext<TContext> & DecoratorArgs;
|
|
43
|
-
};
|
|
44
|
-
export declare type ContextFromDecorator<TDecorator> = TDecorator extends {
|
|
45
|
-
_contextType: infer TContext;
|
|
46
|
-
} ? TContext : never;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationDecorator = void 0;
|
|
4
|
-
const OperationDuration_1 = require("./OperationDuration");
|
|
5
|
-
const OperationErrorHandler_1 = require("./OperationErrorHandler");
|
|
6
|
-
const OperationFinallyHooks_1 = require("./OperationFinallyHooks");
|
|
7
|
-
const OperationTree_1 = require("./OperationTree");
|
|
8
|
-
const wrapTryCatchFinallyPromisable_1 = require("./wrapTryCatchFinallyPromisable");
|
|
9
|
-
class OperationDecorator {
|
|
10
|
-
static createDecoratorFactory(...hookProviders) {
|
|
11
|
-
const decorator = (decoratorArgs) => {
|
|
12
|
-
return function (classProto, methodName, descriptor) {
|
|
13
|
-
const originalMethod = descriptor.value;
|
|
14
|
-
if (!(originalMethod instanceof Function))
|
|
15
|
-
throw new Error('Track decorator can only be applied to class methods');
|
|
16
|
-
const decoratorOf = {
|
|
17
|
-
classProto,
|
|
18
|
-
methodName,
|
|
19
|
-
descriptor,
|
|
20
|
-
originalMethod
|
|
21
|
-
};
|
|
22
|
-
descriptor.value = wrapTryCatchFinallyPromisable_1.wrapTryCatchFinallyPromisable(originalMethod, (ctx) => {
|
|
23
|
-
ctx.decoratorOf = decoratorOf;
|
|
24
|
-
ctx.decoratorArgs = decoratorArgs;
|
|
25
|
-
return hookProviders.map((h) => h.getTryCatchFinallyHook(ctx));
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const decoratorUtils = {};
|
|
30
|
-
for (const hookProvider of hookProviders) {
|
|
31
|
-
Object.assign(decoratorUtils, hookProvider.getDecoratorUtils?.() || {});
|
|
32
|
-
}
|
|
33
|
-
return Object.assign(decorator, decoratorUtils);
|
|
34
|
-
}
|
|
35
|
-
static createDecoratorFactoryWithDefault(...customHookProviders) {
|
|
36
|
-
return OperationDecorator.createDecoratorFactory(OperationErrorHandler_1.OperationErrorHandler, OperationTree_1.OperationTree, OperationDuration_1.OperationDuration, OperationFinallyHooks_1.OperationFinallyHooks, ...customHookProviders);
|
|
37
|
-
}
|
|
38
|
-
static getOperationName(ctx) {
|
|
39
|
-
const ctxDecorated = ctx;
|
|
40
|
-
return (ctxDecorated.decoratorArgs?.operation ||
|
|
41
|
-
ctxDecorated.decoratorOf?.methodName ||
|
|
42
|
-
ctxDecorated.decoratorOf?.originalMethod?.name);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.OperationDecorator = OperationDecorator;
|
|
46
|
-
//# sourceMappingURL=OperationDecorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationDecorator.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationDecorator.ts"],"names":[],"mappings":";;;AAEA,2DAAuD;AACvD,mEAA+D;AAC/D,mEAA+D;AAC/D,mDAA+C;AAC/C,mFAKwC;AAmFxC,MAAa,kBAAkB;IAO7B,MAAM,CAAC,sBAAsB,CAC3B,GAAG,aAAsC;QAUzC,MAAM,SAAS,GAAG,CAAC,aAA8B,EAAiC,EAAE;YAClF,OAAO,UAAU,UAAU,EAAE,UAAU,EAAE,UAAU;gBACjD,MAAM,cAAc,GAAG,UAAU,CAAC,KAAc,CAAA;gBAChD,IAAI,CAAC,CAAC,cAAc,YAAY,QAAQ,CAAC;oBACvC,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;gBAEzE,MAAM,WAAW,GAA6C;oBAC5D,UAAU;oBACV,UAAU;oBACV,UAAU;oBACV,cAAc;iBACf,CAAA;gBACD,UAAU,CAAC,KAAK,GAAG,6DAA6B,CAAC,cAAc,EAAE,CAAC,GAA8B,EAAE,EAAE;oBAClG,GAAG,CAAC,WAAW,GAAG,WAAW,CAAA;oBAC7B,GAAG,CAAC,aAAa,GAAG,aAAa,CAAA;oBACjC,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAA;gBAChE,CAAC,CAAC,CAAA;YACJ,CAAC,CAAA;QACH,CAAC,CAAA;QACD,MAAM,cAAc,GAAG,EAAE,CAAA;QACzB,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;YACxC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;SACxE;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,cAAc,CAAQ,CAAA;IACxD,CAAC;IAWD,MAAM,CAAC,iCAAiC,CACtC,GAAG,mBAA4C;QAE/C,OAAO,kBAAkB,CAAC,sBAAsB,CAC9C,6CAAqB,EACrB,6BAAa,EACb,qCAAiB,EACjB,6CAAqB,EACrB,GAAG,mBAAmB,CACvB,CAAA;IACH,CAAC;IAED,MAAM,CAAC,gBAAgB,CAA0C,GAAa;QAC5E,MAAM,YAAY,GAAG,GAAgC,CAAA;QACrD,OAAO,CACL,YAAY,CAAC,aAAa,EAAE,SAAS;YACrC,YAAY,CAAC,WAAW,EAAE,UAAU;YACpC,YAAY,CAAC,WAAW,EAAE,cAAc,EAAE,IAAI,CAC/C,CAAA;IACH,CAAC;CACF;AA1ED,gDA0EC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
2
|
-
export declare type OperationDurationContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
3
|
-
start?: number;
|
|
4
|
-
duration?: number;
|
|
5
|
-
};
|
|
6
|
-
export declare class OperationDuration {
|
|
7
|
-
static getTryCatchFinallyHook(_ctx: OperationDurationContext): TryCatchFinallyHook<OperationDurationContext>;
|
|
8
|
-
static getPriority(): number;
|
|
9
|
-
static onTry(ctx: OperationDurationContext): void;
|
|
10
|
-
static onFinally(ctx: OperationDurationContext): void;
|
|
11
|
-
static getDuration<TContext extends OperationDurationContext>(ctx: TContext): number | undefined;
|
|
12
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OperationDuration = void 0;
|
|
4
|
-
class OperationDuration {
|
|
5
|
-
static getTryCatchFinallyHook(_ctx) {
|
|
6
|
-
return this;
|
|
7
|
-
}
|
|
8
|
-
static getPriority() {
|
|
9
|
-
return -1000;
|
|
10
|
-
}
|
|
11
|
-
static onTry(ctx) {
|
|
12
|
-
ctx.start = Date.now();
|
|
13
|
-
}
|
|
14
|
-
static onFinally(ctx) {
|
|
15
|
-
if (ctx.start !== undefined)
|
|
16
|
-
ctx.duration = Date.now() - ctx.start;
|
|
17
|
-
}
|
|
18
|
-
static getDuration(ctx) {
|
|
19
|
-
return ctx.duration;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.OperationDuration = OperationDuration;
|
|
23
|
-
//# sourceMappingURL=OperationDuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationDuration.js","sourceRoot":"","sources":["../../../../../src/destinations/engage/utils/operationTracking/OperationDuration.ts"],"names":[],"mappings":";;;AAOA,MAAa,iBAAiB;IAC5B,MAAM,CAAC,sBAAsB,CAAC,IAA8B;QAC1D,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,CAAC,WAAW;QAChB,OAAO,CAAC,IAAI,CAAA;IACd,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,GAA6B;QACxC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACxB,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,GAA6B;QAC5C,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS;YAAE,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,KAAK,CAAA;IACpE,CAAC;IACD,MAAM,CAAC,WAAW,CAA4C,GAAa;QACzE,OAAO,GAAG,CAAC,QAAQ,CAAA;IACrB,CAAC;CACF;AAjBD,8CAiBC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TrackedError } from './TrackedError';
|
|
2
|
-
import { TryCatchFinallyContext, TryCatchFinallyHook } from './wrapTryCatchFinallyPromisable';
|
|
3
|
-
export declare type OperationErrorHandlerContext<TContext extends TryCatchFinallyContext = TryCatchFinallyContext> = TContext & {
|
|
4
|
-
decoratorArgs?: {
|
|
5
|
-
onError?: (ctx: OperationErrorHandlerContext<TContext>) => void;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export declare class OperationErrorHandler {
|
|
9
|
-
static getTryCatchFinallyHook(_ctx: OperationErrorHandlerContext): TryCatchFinallyHook<OperationErrorHandlerContext>;
|
|
10
|
-
static onCatch(ctx: OperationErrorHandlerContext): void;
|
|
11
|
-
static wrap<TContext extends OperationErrorHandlerContext = OperationErrorHandlerContext>(originalError: unknown, getWrapper: (e: unknown) => unknown | undefined, ctx?: TContext): TrackedError<TryCatchFinallyContext<(this: any, ...args: any[]) => any>> | undefined;
|
|
12
|
-
}
|