@segment/action-destinations 3.314.0 → 3.315.1-add-subscription-metadata.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/amazon-ads/generated-types.d.ts +12 -0
- package/dist/destinations/amazon-ads/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/index.d.ts +4 -0
- package/dist/destinations/amazon-ads/index.js +237 -0
- package/dist/destinations/amazon-ads/index.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.d.ts +15 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js +3 -0
- package/dist/destinations/amazon-ads/syncAudiences/generated-types.js.map +1 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.d.ts +5 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js +182 -0
- package/dist/destinations/amazon-ads/syncAudiences/index.js.map +1 -0
- package/dist/destinations/amazon-ads/types.d.ts +47 -0
- package/dist/destinations/amazon-ads/types.js +11 -0
- package/dist/destinations/amazon-ads/types.js.map +1 -0
- package/dist/destinations/amazon-ads/utils.d.ts +37 -0
- package/dist/destinations/amazon-ads/utils.js +25 -0
- package/dist/destinations/amazon-ads/utils.js.map +1 -0
- package/dist/destinations/braze/createAliasV2.types.d.ts +5 -0
- package/dist/destinations/braze/createAliasV2.types.js +3 -0
- package/dist/destinations/braze/createAliasV2.types.js.map +1 -0
- package/dist/destinations/braze/identifyUserV2.types.d.ts +8 -0
- package/dist/destinations/braze/identifyUserV2.types.js +3 -0
- package/dist/destinations/braze/identifyUserV2.types.js.map +1 -0
- package/dist/destinations/braze/trackEvent/index.js +5 -1
- package/dist/destinations/braze/trackEvent/index.js.map +1 -1
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.d.ts +1 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js +184 -0
- package/dist/destinations/braze/updateUserProfile/__snapshots__/snapshot.test.js.map +1 -0
- package/dist/destinations/contentstack/constants.d.ts +3 -0
- package/dist/destinations/contentstack/constants.js +7 -0
- package/dist/destinations/contentstack/constants.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/generated-types.d.ts +7 -0
- package/dist/destinations/contentstack/customAttributesSync/generated-types.js +3 -0
- package/dist/destinations/contentstack/customAttributesSync/generated-types.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/index.d.ts +5 -0
- package/dist/destinations/contentstack/customAttributesSync/index.js +54 -0
- package/dist/destinations/contentstack/customAttributesSync/index.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/types.d.ts +14 -0
- package/dist/destinations/contentstack/customAttributesSync/types.js +3 -0
- package/dist/destinations/contentstack/customAttributesSync/types.js.map +1 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.d.ts +4 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.js +20 -0
- package/dist/destinations/contentstack/customAttributesSync/utils.js.map +1 -0
- package/dist/destinations/contentstack/types.d.ts +12 -0
- package/dist/destinations/contentstack/types.js +3 -0
- package/dist/destinations/contentstack/types.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.d.ts +22 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js +3 -0
- package/dist/destinations/dynamic-yield-audiences/syncAudience/types.js.map +1 -0
- package/dist/destinations/dynamic-yield-audiences/types.d.ts +8 -0
- package/dist/destinations/dynamic-yield-audiences/types.js +12 -0
- package/dist/destinations/dynamic-yield-audiences/types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/Profile.d.ts +6 -0
- package/dist/destinations/engage/sendgrid/Profile.js +3 -0
- package/dist/destinations/engage/sendgrid/Profile.js.map +1 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js +70 -0
- package/dist/destinations/engage/sendgrid/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/index.d.ts +2 -0
- package/dist/destinations/engage/sendgrid/index.js +5 -0
- package/dist/destinations/engage/sendgrid/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js +28 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.d.ts +21 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js +174 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/api-lookups.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js +14 -0
- package/dist/destinations/engage/sendgrid/previewApiLookup/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.d.ts +44 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js +419 -0
- package/dist/destinations/engage/sendgrid/sendEmail/SendEmailPerformer.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.d.ts +12 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js +3 -0
- package/dist/destinations/engage/sendgrid/sendEmail/UnlayerResponse.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js +257 -0
- package/dist/destinations/engage/sendgrid/sendEmail/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/generated-types.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/index.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js +23 -0
- package/dist/destinations/engage/sendgrid/sendEmail/insertEmailPreviewText.js.map +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.d.ts +1 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js +14 -0
- package/dist/destinations/engage/sendgrid/sendEmail/isRestrictedDomain.js.map +1 -0
- package/dist/destinations/engage/twilio/destinationDefinition.d.ts +3 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js +172 -0
- package/dist/destinations/engage/twilio/destinationDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/index.js +5 -0
- package/dist/destinations/engage/twilio/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.d.ts +28 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js +151 -0
- package/dist/destinations/engage/twilio/sendMobilePush/PushSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js +250 -0
- package/dist/destinations/engage/twilio/sendMobilePush/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js +14 -0
- package/dist/destinations/engage/twilio/sendMobilePush/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js +72 -0
- package/dist/destinations/engage/twilio/sendSms/SmsMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js +162 -0
- package/dist/destinations/engage/twilio/sendSms/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendSms/index.js +14 -0
- package/dist/destinations/engage/twilio/sendSms/index.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.d.ts +9 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js +89 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/WhatsAppMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.d.ts +4 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js +136 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/actionDefinition.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/generated-types.js.map +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.d.ts +1 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js +14 -0
- package/dist/destinations/engage/twilio/sendWhatsApp/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js +71 -0
- package/dist/destinations/engage/twilio/utils/PhoneMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.d.ts +16 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js +115 -0
- package/dist/destinations/engage/twilio/utils/TwilioMessageSender.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/index.d.ts +2 -0
- package/dist/destinations/engage/twilio/utils/index.js +15 -0
- package/dist/destinations/engage/twilio/utils/index.js.map +1 -0
- package/dist/destinations/engage/twilio/utils/types.d.ts +23 -0
- package/dist/destinations/engage/twilio/utils/types.js +3 -0
- package/dist/destinations/engage/twilio/utils/types.js.map +1 -0
- package/dist/destinations/engage/utils/AggregateError.d.ts +14 -0
- package/dist/destinations/engage/utils/AggregateError.js +26 -0
- package/dist/destinations/engage/utils/AggregateError.js.map +1 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.d.ts +42 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js +148 -0
- package/dist/destinations/engage/utils/EngageActionPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/EngageLogger.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageLogger.js +52 -0
- package/dist/destinations/engage/utils/EngageLogger.js.map +1 -0
- package/dist/destinations/engage/utils/EngageStats.d.ts +18 -0
- package/dist/destinations/engage/utils/EngageStats.js +95 -0
- package/dist/destinations/engage/utils/EngageStats.js.map +1 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.d.ts +12 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js +31 -0
- package/dist/destinations/engage/utils/IntegrationErrorWrapper.js.map +1 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.d.ts +65 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js +211 -0
- package/dist/destinations/engage/utils/MessageSendPerformer.js.map +1 -0
- package/dist/destinations/engage/utils/Profile.d.ts +6 -0
- package/dist/destinations/engage/utils/Profile.js +3 -0
- package/dist/destinations/engage/utils/Profile.js.map +1 -0
- package/dist/destinations/engage/utils/ResponseError.d.ts +25 -0
- package/dist/destinations/engage/utils/ResponseError.js +22 -0
- package/dist/destinations/engage/utils/ResponseError.js.map +1 -0
- package/dist/destinations/engage/utils/apiLookups.d.ts +22 -0
- package/dist/destinations/engage/utils/apiLookups.js +189 -0
- package/dist/destinations/engage/utils/apiLookups.js.map +1 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.d.ts +2 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js +10 -0
- package/dist/destinations/engage/utils/getProfileApiEndpoint.js.map +1 -0
- package/dist/destinations/engage/utils/index.d.ts +9 -0
- package/dist/destinations/engage/utils/index.js +22 -0
- package/dist/destinations/engage/utils/index.js.map +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.d.ts +1 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js +8 -0
- package/dist/destinations/engage/utils/isDestinationActionService.js.map +1 -0
- package/dist/destinations/engage/utils/isRetryableError.d.ts +2 -0
- package/dist/destinations/engage/utils/isRetryableError.js +33 -0
- package/dist/destinations/engage/utils/isRetryableError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/GenericMethodDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.d.ts +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js +46 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDecorator.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationDuration.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.d.ts +12 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js +35 -0
- package/dist/destinations/engage/utils/operationTracking/OperationErrorHandler.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.d.ts +14 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationFinallyHooks.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.d.ts +31 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js +104 -0
- package/dist/destinations/engage/utils/operationTracking/OperationLogger.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.d.ts +39 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js +130 -0
- package/dist/destinations/engage/utils/operationTracking/OperationStats.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.d.ts +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js +377 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTracker.test.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.d.ts +23 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js +49 -0
- package/dist/destinations/engage/utils/operationTracking/OperationTree.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.d.ts +6 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js +3 -0
- package/dist/destinations/engage/utils/operationTracking/TrackedError.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/index.d.ts +10 -0
- package/dist/destinations/engage/utils/operationTracking/index.js +23 -0
- package/dist/destinations/engage/utils/operationTracking/index.js.map +1 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.d.ts +21 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js +99 -0
- package/dist/destinations/engage/utils/operationTracking/wrapTryCatchFinallyPromisable.js.map +1 -0
- package/dist/destinations/engage/utils/testUtils.d.ts +6 -0
- package/dist/destinations/engage/utils/testUtils.js +26 -0
- package/dist/destinations/engage/utils/testUtils.js.map +1 -0
- package/dist/destinations/engage/utils/track.d.ts +52 -0
- package/dist/destinations/engage/utils/track.js +9 -0
- package/dist/destinations/engage/utils/track.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.d.ts +16 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/previewApiLookup.types.js.map +1 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.d.ts +56 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js +3 -0
- package/dist/destinations/engage-messaging-sendgrid/sendEmail.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.d.ts +39 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendMobilePush.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.d.ts +27 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendSms.types.js.map +1 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.d.ts +25 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js +3 -0
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp.types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/index.js +6 -0
- package/dist/destinations/facebook-conversions-api/index.js.map +1 -1
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.d.ts +67 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js +111 -0
- package/dist/destinations/facebook-conversions-api/initiateCheckout2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.d.ts +67 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/search2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/search2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/search2/index.js +115 -0
- package/dist/destinations/facebook-conversions-api/search2/index.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.d.ts +68 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js +3 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/generated-types.js.map +1 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.d.ts +5 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js +110 -0
- package/dist/destinations/facebook-conversions-api/viewContent2/index.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/add/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/add/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/add/index.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.d.ts +2 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js +3 -0
- package/dist/destinations/facebook-custom-audiences/remove/generated-types.js.map +1 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.d.ts +5 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js +11 -0
- package/dist/destinations/facebook-custom-audiences/remove/index.js.map +1 -0
- package/dist/destinations/first-party-dv360/_tests_/index.test.d.ts +1 -0
- package/dist/destinations/first-party-dv360/_tests_/index.test.js +48 -0
- package/dist/destinations/first-party-dv360/_tests_/index.test.js.map +1 -0
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadCallConversion2/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadClickConversion2/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment2/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment2/index.js.map +1 -1
- package/dist/destinations/hubspot/customEvent/client.js.map +1 -1
- package/dist/destinations/hubspot/customEvent/hubspot-api.d.ts +62 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js +305 -0
- package/dist/destinations/hubspot/customEvent/hubspot-api.js.map +1 -0
- package/dist/destinations/hubspot/customEvent/index.js +2 -2
- package/dist/destinations/hubspot/customEvent/index.js.map +1 -1
- package/dist/destinations/hubspot/customEvent/utils.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/common-fields.js +1 -2
- package/dist/destinations/hubspot/upsertObject/common-fields.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/generated-types.d.ts +1 -1
- package/dist/destinations/hubspot/upsertObject/hubspot-api.d.ts +219 -0
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js +609 -0
- package/dist/destinations/hubspot/upsertObject/hubspot-api.js.map +1 -0
- package/dist/destinations/hubspot/upsertObject/index.js +1 -1
- package/dist/destinations/hubspot/upsertObject/index.js.map +1 -1
- package/dist/destinations/hubspot/upsertObject/utils.js +5 -1
- package/dist/destinations/hubspot/upsertObject/utils.js.map +1 -1
- package/dist/destinations/klaviyo/orderCompleted/formatters.d.ts +26 -0
- package/dist/destinations/klaviyo/orderCompleted/formatters.js +62 -0
- package/dist/destinations/klaviyo/orderCompleted/formatters.js.map +1 -0
- package/dist/destinations/klaviyo/orderCompleted/types.d.ts +2 -0
- package/dist/destinations/klaviyo/orderCompleted/types.js +3 -0
- package/dist/destinations/klaviyo/orderCompleted/types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.d.ts +4 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js +3 -0
- package/dist/destinations/klaviyo/removeProfileToList/generated-types.js.map +1 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.d.ts +5 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js +43 -0
- package/dist/destinations/klaviyo/removeProfileToList/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/generated-types.d.ts +3 -0
- package/dist/destinations/mappings-two-test/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/index.d.ts +4 -0
- package/dist/destinations/mappings-two-test/index.js +32 -0
- package/dist/destinations/mappings-two-test/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.d.ts +53 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/kitchenSink/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.d.ts +5 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.js +289 -0
- package/dist/destinations/mappings-two-test/kitchenSink/index.js.map +1 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.d.ts +17 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js +3 -0
- package/dist/destinations/mappings-two-test/sendEvent/generated-types.js.map +1 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.d.ts +5 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.js +343 -0
- package/dist/destinations/mappings-two-test/sendEvent/index.js.map +1 -0
- package/dist/destinations/mixpanel/utils.d.ts +13 -0
- package/dist/destinations/mixpanel/utils.js +117 -0
- package/dist/destinations/mixpanel/utils.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js +3 -0
- package/dist/destinations/movable-ink/categoryView/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/categoryView/index.d.ts +5 -0
- package/dist/destinations/movable-ink/categoryView/index.js +43 -0
- package/dist/destinations/movable-ink/categoryView/index.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/generated-types.d.ts +20 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js +3 -0
- package/dist/destinations/movable-ink/conversion/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/conversion/index.d.ts +5 -0
- package/dist/destinations/movable-ink/conversion/index.js +45 -0
- package/dist/destinations/movable-ink/conversion/index.js.map +1 -0
- package/dist/destinations/movable-ink/fields.d.ts +21 -0
- package/dist/destinations/movable-ink/fields.js +236 -0
- package/dist/destinations/movable-ink/fields.js.map +1 -0
- package/dist/destinations/movable-ink/identify/generated-types.d.ts +7 -0
- package/dist/destinations/movable-ink/identify/generated-types.js +3 -0
- package/dist/destinations/movable-ink/identify/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/identify/index.d.ts +5 -0
- package/dist/destinations/movable-ink/identify/index.js +32 -0
- package/dist/destinations/movable-ink/identify/index.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.d.ts +22 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productAdded/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productAdded/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productAdded/index.js +43 -0
- package/dist/destinations/movable-ink/productAdded/index.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.d.ts +21 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js +3 -0
- package/dist/destinations/movable-ink/productViewed/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/productViewed/index.d.ts +5 -0
- package/dist/destinations/movable-ink/productViewed/index.js +43 -0
- package/dist/destinations/movable-ink/productViewed/index.js.map +1 -0
- package/dist/destinations/movable-ink/search/generated-types.d.ts +12 -0
- package/dist/destinations/movable-ink/search/generated-types.js +3 -0
- package/dist/destinations/movable-ink/search/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/search/index.d.ts +5 -0
- package/dist/destinations/movable-ink/search/index.js +43 -0
- package/dist/destinations/movable-ink/search/index.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.d.ts +25 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js +3 -0
- package/dist/destinations/movable-ink/sendCustomEvent/generated-types.js.map +1 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.d.ts +5 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js +48 -0
- package/dist/destinations/movable-ink/sendCustomEvent/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.d.ts +14 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js +3 -0
- package/dist/destinations/responsys/asyncMergePetRecords/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js +113 -0
- package/dist/destinations/responsys/asyncMergePetRecords/index.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.d.ts +20 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js +3 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/generated-types.js.map +1 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.d.ts +5 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js +174 -0
- package/dist/destinations/responsys/asyncMergeProfileListMembers/index.js.map +1 -0
- package/dist/destinations/responsys/rsp-operations.d.ts +14 -0
- package/dist/destinations/responsys/rsp-operations.js +33 -0
- package/dist/destinations/responsys/rsp-operations.js.map +1 -0
- package/dist/destinations/responsys/rsp-properties.d.ts +4 -0
- package/dist/destinations/responsys/rsp-properties.js +27 -0
- package/dist/destinations/responsys/rsp-properties.js.map +1 -0
- package/dist/destinations/salesforce/account2/generated-types.d.ts +32 -0
- package/dist/destinations/salesforce/account2/generated-types.js +3 -0
- package/dist/destinations/salesforce/account2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/account2/index.d.ts +5 -0
- package/dist/destinations/salesforce/account2/index.js +248 -0
- package/dist/destinations/salesforce/account2/index.js.map +1 -0
- package/dist/destinations/salesforce/cases2/generated-types.d.ts +17 -0
- package/dist/destinations/salesforce/cases2/generated-types.js +3 -0
- package/dist/destinations/salesforce/cases2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/cases2/index.d.ts +5 -0
- package/dist/destinations/salesforce/cases2/index.js +76 -0
- package/dist/destinations/salesforce/cases2/index.js.map +1 -0
- package/dist/destinations/salesforce/contact2/generated-types.d.ts +25 -0
- package/dist/destinations/salesforce/contact2/generated-types.js +3 -0
- package/dist/destinations/salesforce/contact2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/contact2/index.d.ts +5 -0
- package/dist/destinations/salesforce/contact2/index.js +192 -0
- package/dist/destinations/salesforce/contact2/index.js.map +1 -0
- package/dist/destinations/salesforce/customObject2/generated-types.d.ts +17 -0
- package/dist/destinations/salesforce/customObject2/generated-types.js +3 -0
- package/dist/destinations/salesforce/customObject2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/customObject2/index.d.ts +5 -0
- package/dist/destinations/salesforce/customObject2/index.js +97 -0
- package/dist/destinations/salesforce/customObject2/index.js.map +1 -0
- package/dist/destinations/salesforce/lead2/generated-types.d.ts +25 -0
- package/dist/destinations/salesforce/lead2/generated-types.js +3 -0
- package/dist/destinations/salesforce/lead2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/lead2/index.d.ts +5 -0
- package/dist/destinations/salesforce/lead2/index.js +200 -0
- package/dist/destinations/salesforce/lead2/index.js.map +1 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.d.ts +21 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.js +3 -0
- package/dist/destinations/salesforce/opportunity2/generated-types.js.map +1 -0
- package/dist/destinations/salesforce/opportunity2/index.d.ts +5 -0
- package/dist/destinations/salesforce/opportunity2/index.js +112 -0
- package/dist/destinations/salesforce/opportunity2/index.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js +381 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV2tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.d.ts +1 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js +581 -0
- package/dist/destinations/snap-conversions-api/_tests_/capiV3tests.js.map +1 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.d.ts +4 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js +97 -0
- package/dist/destinations/snap-conversions-api/reportConversionEvent/snap-capi-v2.js.map +1 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.d.ts +30 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js +316 -0
- package/dist/destinations/snap-conversions-api/snap-capi-properties.js.map +1 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js +34 -0
- package/dist/destinations/tiktok-conversions/reportWebEvent/formatter.js.map +1 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.d.ts +3 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js +43 -0
- package/dist/destinations/tiktok-offline-conversions/reportOfflineEvent/formatter.js.map +1 -0
- package/dist/destinations/trackey/group.types.d.ts +11 -0
- package/dist/destinations/trackey/group.types.js +3 -0
- package/dist/destinations/trackey/group.types.js.map +1 -0
- package/dist/destinations/trackey/identify.types.d.ts +11 -0
- package/dist/destinations/trackey/identify.types.js +3 -0
- package/dist/destinations/trackey/identify.types.js.map +1 -0
- package/dist/destinations/trackey/track.types.d.ts +12 -0
- package/dist/destinations/trackey/track.types.js +3 -0
- package/dist/destinations/trackey/track.types.js.map +1 -0
- package/dist/destinations/webhook-extensible/types.d.ts +6 -0
- package/dist/destinations/webhook-extensible/types.js +3 -0
- package/dist/destinations/webhook-extensible/types.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Kitchen Sink',
|
|
5
|
+
description: 'Action with all possible field types',
|
|
6
|
+
platform: 'cloud',
|
|
7
|
+
syncMode: {
|
|
8
|
+
description: 'Define how the records from your destination will be synced to mappings 2 test destination',
|
|
9
|
+
label: 'How to sync records',
|
|
10
|
+
default: 'add',
|
|
11
|
+
choices: [
|
|
12
|
+
{ label: 'Adds record to mappings 2 test destination', value: 'add' },
|
|
13
|
+
{ label: 'Updates record in mappings 2 test destination', value: 'update' }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
hooks: {
|
|
17
|
+
onMappingSave: {
|
|
18
|
+
label: 'Excute the test hook 🎣',
|
|
19
|
+
description: 'This hook will be executed when the mapping is saved 🐟🐟🐟. It will send a test event to the destination.',
|
|
20
|
+
inputFields: {
|
|
21
|
+
structured_hook_input: {
|
|
22
|
+
label: 'Structured Hook Input',
|
|
23
|
+
description: 'A test structured object',
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
name: {
|
|
27
|
+
label: 'Name',
|
|
28
|
+
description: 'A test string field',
|
|
29
|
+
type: 'string'
|
|
30
|
+
},
|
|
31
|
+
age: {
|
|
32
|
+
label: 'Age',
|
|
33
|
+
description: 'A test number field',
|
|
34
|
+
type: 'number'
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
outputTypes: {},
|
|
40
|
+
performHook: async (request, { hookInputs, hookOutputs, payload, settings }) => {
|
|
41
|
+
const api_key = settings.apiKey;
|
|
42
|
+
await request('https://api.segment.io/v1/t', {
|
|
43
|
+
method: 'POST',
|
|
44
|
+
json: {
|
|
45
|
+
userId: 'test-user',
|
|
46
|
+
type: 'track',
|
|
47
|
+
event: 'test-event-hooks',
|
|
48
|
+
writeKey: api_key,
|
|
49
|
+
properties: {
|
|
50
|
+
hookInputs,
|
|
51
|
+
hookOutputs,
|
|
52
|
+
payload
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
fields: {
|
|
61
|
+
string_field: {
|
|
62
|
+
label: 'String Field',
|
|
63
|
+
description: 'A test string field',
|
|
64
|
+
type: 'string',
|
|
65
|
+
format: 'email'
|
|
66
|
+
},
|
|
67
|
+
dynamic_string_field: {
|
|
68
|
+
label: 'Dynamic String Field',
|
|
69
|
+
description: 'A test dynamic string field',
|
|
70
|
+
type: 'string',
|
|
71
|
+
dynamic: true
|
|
72
|
+
},
|
|
73
|
+
number_field: {
|
|
74
|
+
label: 'Number Field',
|
|
75
|
+
description: 'A test number field',
|
|
76
|
+
type: 'number',
|
|
77
|
+
required: true
|
|
78
|
+
},
|
|
79
|
+
boolean_field: {
|
|
80
|
+
label: 'Boolean Field',
|
|
81
|
+
description: 'A test boolean field',
|
|
82
|
+
type: 'boolean'
|
|
83
|
+
},
|
|
84
|
+
string_select: {
|
|
85
|
+
label: 'Select field',
|
|
86
|
+
description: 'A test select field to pick a single string value',
|
|
87
|
+
type: 'string',
|
|
88
|
+
choices: [
|
|
89
|
+
{ label: 'Option 1', value: 'option1' },
|
|
90
|
+
{ label: 'Option 2', value: 'option2' }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
select_number: {
|
|
94
|
+
label: 'Select Number',
|
|
95
|
+
description: 'A test select field to pick a single number value',
|
|
96
|
+
type: 'number',
|
|
97
|
+
choices: [
|
|
98
|
+
{ label: 'Number 1', value: 1 },
|
|
99
|
+
{ label: 'Number 2', value: 2 }
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
array_field: {
|
|
103
|
+
label: 'Array of string field (Unsupported)',
|
|
104
|
+
description: 'A test array of string field',
|
|
105
|
+
type: 'string',
|
|
106
|
+
multiple: true
|
|
107
|
+
},
|
|
108
|
+
date_time_field: {
|
|
109
|
+
label: 'Date time field',
|
|
110
|
+
description: 'A test date time field',
|
|
111
|
+
type: 'datetime'
|
|
112
|
+
},
|
|
113
|
+
integer_field: {
|
|
114
|
+
label: 'Integer field',
|
|
115
|
+
description: 'A test integer field',
|
|
116
|
+
type: 'integer'
|
|
117
|
+
},
|
|
118
|
+
password_field: {
|
|
119
|
+
label: 'Password field',
|
|
120
|
+
description: 'A test password field',
|
|
121
|
+
type: 'password'
|
|
122
|
+
},
|
|
123
|
+
text_field: {
|
|
124
|
+
label: 'Text field',
|
|
125
|
+
description: 'A Text Field',
|
|
126
|
+
type: 'text'
|
|
127
|
+
},
|
|
128
|
+
unstructured_object: {
|
|
129
|
+
label: 'Unstructured Object',
|
|
130
|
+
description: 'A test unstructured object',
|
|
131
|
+
type: 'object',
|
|
132
|
+
defaultObjectUI: 'keyvalue:only'
|
|
133
|
+
},
|
|
134
|
+
mappable_object: {
|
|
135
|
+
label: 'Unstructured Object that is only mappable',
|
|
136
|
+
description: 'A test unstructured object',
|
|
137
|
+
type: 'object',
|
|
138
|
+
defaultObjectUI: 'object:only'
|
|
139
|
+
},
|
|
140
|
+
mappable_and_editable_object: {
|
|
141
|
+
label: 'Unstructured Object that is both mappable and editable',
|
|
142
|
+
description: 'A test unstructured object that is both mappable and editable',
|
|
143
|
+
type: 'object'
|
|
144
|
+
},
|
|
145
|
+
structured_object: {
|
|
146
|
+
label: 'Structured Object',
|
|
147
|
+
description: 'A test structured object',
|
|
148
|
+
type: 'object',
|
|
149
|
+
properties: {
|
|
150
|
+
name: {
|
|
151
|
+
label: 'Name',
|
|
152
|
+
description: 'A test string field',
|
|
153
|
+
type: 'string'
|
|
154
|
+
},
|
|
155
|
+
age: {
|
|
156
|
+
label: 'Age',
|
|
157
|
+
description: 'A test number field',
|
|
158
|
+
type: 'number'
|
|
159
|
+
},
|
|
160
|
+
is_active: {
|
|
161
|
+
label: 'Is Active',
|
|
162
|
+
description: 'A test boolean field',
|
|
163
|
+
type: 'boolean'
|
|
164
|
+
},
|
|
165
|
+
role: {
|
|
166
|
+
label: 'Role',
|
|
167
|
+
description: 'A test select field to pick a single string value',
|
|
168
|
+
type: 'string',
|
|
169
|
+
choices: [
|
|
170
|
+
{ label: 'Admin', value: 'admin' },
|
|
171
|
+
{ label: 'User', value: 'user' }
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
structured_object_with_additional_properties: {
|
|
177
|
+
label: 'Structured Object with Additional Properties',
|
|
178
|
+
description: 'A test structured object with additional properties',
|
|
179
|
+
type: 'object',
|
|
180
|
+
additionalProperties: true,
|
|
181
|
+
properties: {
|
|
182
|
+
name: {
|
|
183
|
+
label: 'Name',
|
|
184
|
+
description: 'A test string field',
|
|
185
|
+
type: 'string'
|
|
186
|
+
},
|
|
187
|
+
age: {
|
|
188
|
+
label: 'Age',
|
|
189
|
+
description: 'A test number field',
|
|
190
|
+
type: 'number'
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
structured_array_of_objects: {
|
|
195
|
+
label: 'Structured Array of Objects',
|
|
196
|
+
description: 'A test structured array of objects',
|
|
197
|
+
type: 'object',
|
|
198
|
+
multiple: true,
|
|
199
|
+
properties: {
|
|
200
|
+
name: {
|
|
201
|
+
label: 'Name',
|
|
202
|
+
description: 'A test string field',
|
|
203
|
+
type: 'string'
|
|
204
|
+
},
|
|
205
|
+
age: {
|
|
206
|
+
label: 'Age',
|
|
207
|
+
description: 'A test number field',
|
|
208
|
+
type: 'number'
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
structured_array_of_objects_with_additional_props: {
|
|
213
|
+
label: 'Structured Array of Objects with Additional Properties',
|
|
214
|
+
description: 'A test structured array of objects with additional properties',
|
|
215
|
+
type: 'object',
|
|
216
|
+
multiple: true,
|
|
217
|
+
additionalProperties: true,
|
|
218
|
+
properties: {
|
|
219
|
+
name: {
|
|
220
|
+
label: 'Name',
|
|
221
|
+
description: 'A test string field',
|
|
222
|
+
type: 'string'
|
|
223
|
+
},
|
|
224
|
+
age: {
|
|
225
|
+
label: 'Age',
|
|
226
|
+
description: 'A test number field',
|
|
227
|
+
type: 'number'
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
dynamicFields: {
|
|
233
|
+
dynamic_string_field: async () => {
|
|
234
|
+
return Promise.resolve({
|
|
235
|
+
choices: [
|
|
236
|
+
{
|
|
237
|
+
label: 'Cat 🐱',
|
|
238
|
+
value: 'cat',
|
|
239
|
+
type: 'string',
|
|
240
|
+
description: 'A small, independent, and playful pet known for its agility and affectionate purring.'
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
label: 'Dog 🐶',
|
|
244
|
+
value: 'dog',
|
|
245
|
+
type: 'string',
|
|
246
|
+
description: "A loyal and friendly pet, great for companionship and known as man's best friend."
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
label: 'Elephant 🐘',
|
|
250
|
+
value: 'elephant',
|
|
251
|
+
type: 'string',
|
|
252
|
+
description: 'A large and intelligent animal with a trunk, known for its memory and social structure.'
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: 'Dolphin 🐬',
|
|
256
|
+
value: 'dolphin',
|
|
257
|
+
type: 'string',
|
|
258
|
+
description: 'A highly intelligent and social marine mammal known for its playful behavior and acrobatics.'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: 'Tiger 🐅',
|
|
262
|
+
value: 'tiger',
|
|
263
|
+
type: 'string',
|
|
264
|
+
description: 'A majestic and powerful big cat, known for its striking orange coat with black stripes.'
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
nextPage: ''
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
perform: (request, { payload, settings, syncMode }) => {
|
|
272
|
+
const api_key = settings.apiKey;
|
|
273
|
+
return request('https://api.segment.io/v1/t', {
|
|
274
|
+
method: 'POST',
|
|
275
|
+
json: {
|
|
276
|
+
userId: 'test-user',
|
|
277
|
+
type: 'track',
|
|
278
|
+
event: 'test-event',
|
|
279
|
+
writeKey: api_key,
|
|
280
|
+
properties: {
|
|
281
|
+
...payload,
|
|
282
|
+
syncMode
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
exports.default = action;
|
|
289
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/mappings-two-test/kitchenSink/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,WAAW,EAAE,4FAA4F;QACzG,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,KAAK;QACd,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,4CAA4C,EAAE,KAAK,EAAE,KAAK,EAAE;YACrE,EAAE,KAAK,EAAE,+CAA+C,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC5E;KACF;IACD,KAAK,EAAE;QACL,aAAa,EAAE;YACb,KAAK,EAAE,yBAAyB;YAChC,WAAW,EACT,4GAA4G;YAC9G,WAAW,EAAE;gBACX,qBAAqB,EAAE;oBACr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,KAAK,EAAE,SAAS;wBAChB,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8FAA8F;qBAC5G;oBACD;wBACE,KAAK,EAAE,UAAU;wBACjB,KAAK,EAAE,OAAO;wBACd,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yFAAyF;qBACvG;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb,CAAC,CAAA;QACJ,CAAC;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpD,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA;QAC/B,OAAO,OAAO,CAAC,6BAA6B,EAAE;YAC5C,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,MAAM,EAAE,WAAW;gBACnB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,YAAY;gBACnB,QAAQ,EAAE,OAAO;gBACjB,UAAU,EAAE;oBACV,GAAG,OAAO;oBACV,QAAQ;iBACT;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
test_field?: string;
|
|
3
|
+
dynamic_object: {
|
|
4
|
+
[k: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
dynamic_structured_object: {
|
|
7
|
+
pet?: string;
|
|
8
|
+
plant?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
age?: number;
|
|
11
|
+
};
|
|
12
|
+
dynamic_array?: {
|
|
13
|
+
product_category?: string;
|
|
14
|
+
product_name?: string;
|
|
15
|
+
product_price?: number;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/mappings-two-test/sendEvent/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const action = {
|
|
4
|
+
title: 'Send Event',
|
|
5
|
+
description: 'Test Segment Action',
|
|
6
|
+
platform: 'cloud',
|
|
7
|
+
syncMode: {
|
|
8
|
+
description: 'Define how the records from your destination will be synced to mappings 2 test destination',
|
|
9
|
+
label: 'How to sync records',
|
|
10
|
+
default: 'update',
|
|
11
|
+
choices: [
|
|
12
|
+
{ label: 'Adds record to mappings 2 test destination', value: 'add' },
|
|
13
|
+
{ label: 'Updates record in mappings 2 test destination', value: 'update' }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
fields: {
|
|
17
|
+
test_field: {
|
|
18
|
+
label: 'Test Field',
|
|
19
|
+
description: 'A test string field',
|
|
20
|
+
type: 'string'
|
|
21
|
+
},
|
|
22
|
+
dynamic_object: {
|
|
23
|
+
label: 'Dynamic Object',
|
|
24
|
+
description: 'A dynamic object',
|
|
25
|
+
type: 'object',
|
|
26
|
+
required: true,
|
|
27
|
+
defaultObjectUI: 'keyvalue:only',
|
|
28
|
+
dynamic: true
|
|
29
|
+
},
|
|
30
|
+
dynamic_structured_object: {
|
|
31
|
+
label: 'Choose a pet or plant',
|
|
32
|
+
description: 'Choose a pet or plant and provide details',
|
|
33
|
+
type: 'object',
|
|
34
|
+
required: true,
|
|
35
|
+
defaultObjectUI: 'keyvalue',
|
|
36
|
+
properties: {
|
|
37
|
+
pet: {
|
|
38
|
+
label: 'Pet type',
|
|
39
|
+
description: 'Pet type',
|
|
40
|
+
type: 'string',
|
|
41
|
+
dynamic: true
|
|
42
|
+
},
|
|
43
|
+
plant: {
|
|
44
|
+
label: 'Plant type',
|
|
45
|
+
description: 'Plant type',
|
|
46
|
+
type: 'string',
|
|
47
|
+
dynamic: true
|
|
48
|
+
},
|
|
49
|
+
name: {
|
|
50
|
+
label: 'Name',
|
|
51
|
+
description: 'Name',
|
|
52
|
+
type: 'string'
|
|
53
|
+
},
|
|
54
|
+
age: {
|
|
55
|
+
label: 'Age',
|
|
56
|
+
description: 'Age',
|
|
57
|
+
type: 'number',
|
|
58
|
+
choices: [
|
|
59
|
+
{ label: '0-10', value: 1 },
|
|
60
|
+
{ label: '10-20', value: 2 }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
dynamic_array: {
|
|
66
|
+
label: 'Dynamic Array',
|
|
67
|
+
description: 'A dynamic array',
|
|
68
|
+
type: 'object',
|
|
69
|
+
defaultObjectUI: 'arrayeditor',
|
|
70
|
+
multiple: true,
|
|
71
|
+
properties: {
|
|
72
|
+
product_category: {
|
|
73
|
+
label: 'Product Category',
|
|
74
|
+
description: 'Product Category',
|
|
75
|
+
type: 'string',
|
|
76
|
+
choices: [
|
|
77
|
+
{ label: 'Electronics', value: 'electronics' },
|
|
78
|
+
{ label: 'Home Decor', value: 'home-decor' },
|
|
79
|
+
{ label: 'Clothing', value: 'clothing' }
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
product_name: {
|
|
83
|
+
label: 'Product Name',
|
|
84
|
+
description: 'Product Name',
|
|
85
|
+
type: 'string',
|
|
86
|
+
dynamic: true
|
|
87
|
+
},
|
|
88
|
+
product_price: {
|
|
89
|
+
label: 'Product Price',
|
|
90
|
+
description: 'Product Price',
|
|
91
|
+
type: 'number'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
dynamicFields: {
|
|
97
|
+
dynamic_object: {
|
|
98
|
+
__keys__: async () => {
|
|
99
|
+
return Promise.resolve({
|
|
100
|
+
choices: [
|
|
101
|
+
{
|
|
102
|
+
label: 'Apple 🍎',
|
|
103
|
+
value: 'apple',
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'A crisp and juicy red fruit, perfect for snacking or making pies.'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Banana 🍌',
|
|
109
|
+
value: 'banana',
|
|
110
|
+
type: 'string',
|
|
111
|
+
description: 'A sweet and soft yellow fruit, ideal for a quick energy boost.'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: 'Cherry 🍒',
|
|
115
|
+
value: 'cherry',
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'A small and tart red fruit, great for desserts and snacking.'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: 'Grapes 🍇',
|
|
121
|
+
value: 'grapes',
|
|
122
|
+
type: 'string',
|
|
123
|
+
description: 'Juicy and sweet clusters of small, round fruits, perfect for snacking or making wine.'
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: 'Orange 🍊',
|
|
127
|
+
value: 'orange',
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'A tangy and refreshing orange fruit, great for juicing or eating fresh.'
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
nextPage: ''
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
__values__: async (_, { dynamicFieldContext }) => {
|
|
136
|
+
if (!dynamicFieldContext?.selectedKey) {
|
|
137
|
+
throw new Error('Selected key is missing');
|
|
138
|
+
}
|
|
139
|
+
const selectedKey = dynamicFieldContext?.selectedKey || 'unknwon';
|
|
140
|
+
return Promise.resolve({
|
|
141
|
+
choices: [
|
|
142
|
+
{
|
|
143
|
+
label: `${selectedKey} juice`,
|
|
144
|
+
value: `${selectedKey}_juice`
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: `${selectedKey} cake`,
|
|
148
|
+
value: `${selectedKey}_cake`
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: `${selectedKey} smoothie`,
|
|
152
|
+
value: `${selectedKey}_smoothie`
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
nextPage: ''
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
dynamic_structured_object: {
|
|
160
|
+
pet: async () => {
|
|
161
|
+
return Promise.resolve({
|
|
162
|
+
choices: [
|
|
163
|
+
{
|
|
164
|
+
label: 'Cat 🐱',
|
|
165
|
+
value: 'cat',
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: 'A small, independent, and playful pet known for its agility and affectionate purring.'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: 'Dog 🐶',
|
|
171
|
+
value: 'dog',
|
|
172
|
+
type: 'string',
|
|
173
|
+
description: 'A loyal and friendly pet, great for companionship'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
label: 'Fish 🐠',
|
|
177
|
+
value: 'fish',
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: 'A small and low-maintenance pet that lives in water.'
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
nextPage: ''
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
plant: async () => {
|
|
186
|
+
return Promise.resolve({
|
|
187
|
+
choices: [
|
|
188
|
+
{
|
|
189
|
+
label: 'Fern 🌿',
|
|
190
|
+
value: 'fern',
|
|
191
|
+
type: 'string',
|
|
192
|
+
description: 'A leafy green plant that thrives in humid environments.'
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'Cactus 🌵',
|
|
196
|
+
value: 'cactus',
|
|
197
|
+
type: 'string',
|
|
198
|
+
description: 'A spiky plant that requires minimal water and sunlight.'
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
label: 'Succulent 🌱',
|
|
202
|
+
value: 'succulent',
|
|
203
|
+
type: 'string',
|
|
204
|
+
description: 'A fleshy plant that stores water in its leaves, stems, or roots.'
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
nextPage: ''
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
dynamic_array: {
|
|
212
|
+
product_name: async (_, { dynamicFieldContext, payload }) => {
|
|
213
|
+
const products = [
|
|
214
|
+
{
|
|
215
|
+
name: 'Laptop 💻',
|
|
216
|
+
category: 'electronics',
|
|
217
|
+
slug: 'laptop',
|
|
218
|
+
description: 'A high-performance laptop with 16GB RAM and 512GB SSD.'
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'Smartphone 📱',
|
|
222
|
+
category: 'electronics',
|
|
223
|
+
slug: 'smartphone',
|
|
224
|
+
description: 'A sleek smartphone with a powerful camera and long battery life.'
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'Headphones 🎧',
|
|
228
|
+
category: 'electronics',
|
|
229
|
+
slug: 'headphones',
|
|
230
|
+
description: 'Noise-cancelling over-ear headphones with premium sound quality.'
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'Smartwatch ⌚',
|
|
234
|
+
category: 'electronics',
|
|
235
|
+
slug: 'smartwatch',
|
|
236
|
+
description: 'A stylish smartwatch with fitness tracking and notifications.'
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'T-shirt 👕',
|
|
240
|
+
category: 'clothing',
|
|
241
|
+
slug: 't-shirt',
|
|
242
|
+
description: 'A comfortable cotton t-shirt available in various colors.'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'Jeans 👖',
|
|
246
|
+
category: 'clothing',
|
|
247
|
+
slug: 'jeans',
|
|
248
|
+
description: 'Classic blue jeans with a modern slim fit.'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'Sneakers 👟',
|
|
252
|
+
category: 'clothing',
|
|
253
|
+
slug: 'sneakers',
|
|
254
|
+
description: 'Stylish and comfortable sneakers for everyday wear.'
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'Jacket 🧥',
|
|
258
|
+
category: 'clothing',
|
|
259
|
+
slug: 'jacket',
|
|
260
|
+
description: 'A warm and trendy jacket perfect for cold weather.'
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: 'Table Lamp 🛋️',
|
|
264
|
+
category: 'Home Decor',
|
|
265
|
+
slug: 'table-lamp',
|
|
266
|
+
description: 'A modern table lamp with adjustable brightness.'
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'Sofa 🛋️',
|
|
270
|
+
category: 'Home Decor',
|
|
271
|
+
slug: 'sofa',
|
|
272
|
+
description: 'A comfortable sofa with a stylish design and durable fabric.'
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'Wall Art 🖼️',
|
|
276
|
+
category: 'home-decor',
|
|
277
|
+
slug: 'wall-art',
|
|
278
|
+
description: 'Beautiful wall art to add a touch of elegance to your home.'
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: 'Rug 🏡',
|
|
282
|
+
category: 'home-decor',
|
|
283
|
+
slug: 'rug',
|
|
284
|
+
description: 'A soft and cozy rug perfect for any living space.'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'Bluetooth Speaker 🔊',
|
|
288
|
+
category: 'Electronics',
|
|
289
|
+
slug: 'bluetooth-speaker',
|
|
290
|
+
description: 'Portable Bluetooth speaker with powerful sound and long battery life.'
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
name: 'Dress 👗',
|
|
294
|
+
category: 'Clothing',
|
|
295
|
+
slug: 'dress',
|
|
296
|
+
description: 'A stylish dress perfect for both casual and formal occasions.'
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
name: 'Curtains 🏡',
|
|
300
|
+
category: 'home-decor',
|
|
301
|
+
slug: 'curtains',
|
|
302
|
+
description: 'Elegant curtains to enhance the look of any room.'
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'Table 🛋️',
|
|
306
|
+
category: 'home-decor',
|
|
307
|
+
slug: 'table',
|
|
308
|
+
description: 'A modern dining table made of high-quality wood.'
|
|
309
|
+
}
|
|
310
|
+
];
|
|
311
|
+
const index = dynamicFieldContext?.selectedArrayIndex || 0;
|
|
312
|
+
const selectedCategory = payload.dynamic_array?.[index]?.product_category;
|
|
313
|
+
const choices = products
|
|
314
|
+
.filter((product) => (selectedCategory ? product.category === selectedCategory : true))
|
|
315
|
+
.map((product) => {
|
|
316
|
+
return { value: product.slug, label: product.name };
|
|
317
|
+
});
|
|
318
|
+
return Promise.resolve({
|
|
319
|
+
choices: choices,
|
|
320
|
+
nextPage: ''
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
perform: (request, { payload, settings, syncMode }) => {
|
|
326
|
+
const api_key = settings.apiKey;
|
|
327
|
+
return request('https://api.segment.io/v1/t', {
|
|
328
|
+
method: 'POST',
|
|
329
|
+
json: {
|
|
330
|
+
userId: 'test-user',
|
|
331
|
+
type: 'track',
|
|
332
|
+
event: 'test-event',
|
|
333
|
+
writeKey: api_key,
|
|
334
|
+
properties: {
|
|
335
|
+
...payload,
|
|
336
|
+
syncMode
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
exports.default = action;
|
|
343
|
+
//# sourceMappingURL=index.js.map
|