@adtrackify/at-service-common 4.0.2 → 4.0.3
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/cjs/__tests__/clients/acuity-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/acuity-client.spec.js +43 -43
- package/dist/cjs/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/cross-platform-compression.spec.js +354 -354
- package/dist/cjs/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/dynamodb-client.spec.js +194 -194
- package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js +931 -931
- package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.js +563 -563
- package/dist/cjs/__tests__/clients/sqs-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/sqs-client.spec.js +191 -191
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js +1357 -1357
- package/dist/cjs/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/contact-enrichments-db-service.spec.js +68 -68
- package/dist/cjs/__tests__/db/destinations-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/destinations-db-service.spec.js +125 -125
- package/dist/cjs/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/shared-read-db-services.spec.js +89 -89
- package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.js +104 -104
- package/dist/cjs/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/subscriptions-db-service.spec.js +95 -95
- package/dist/cjs/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/db/user-accounts-db-service.spec.js +76 -76
- package/dist/cjs/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
- package/dist/cjs/__tests__/helpers/account-users-helper.spec.js +220 -220
- package/dist/cjs/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
- package/dist/cjs/__tests__/helpers/acuity-helper.spec.js +69 -69
- package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
- package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js +82 -82
- package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.js +676 -676
- package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1140 -1140
- package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
- package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.js +851 -851
- package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
- package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1060 -1060
- package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
- package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.js +818 -818
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +584 -584
- package/dist/cjs/__tests__/libs/compress-decompress.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/compress-decompress.spec.js +16 -16
- package/dist/cjs/__tests__/libs/contacts.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/contacts.spec.js +294 -294
- package/dist/cjs/__tests__/libs/currency.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/currency.spec.js +220 -220
- package/dist/cjs/__tests__/libs/dates.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/dates.spec.js +130 -130
- package/dist/cjs/__tests__/libs/domain.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/domain.spec.js +107 -107
- package/dist/cjs/__tests__/libs/numbers.spec.d.ts +1 -1
- package/dist/cjs/__tests__/libs/numbers.spec.js +261 -261
- package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
- package/dist/cjs/__tests__/s3-client/s3-client.spec.js +33 -33
- package/dist/cjs/__tests__/services/acuity-api-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/services/acuity-api-service.spec.js +71 -71
- package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js +93 -93
- package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
- package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js +57 -57
- package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
- package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.js +35 -35
- package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
- package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js +181 -181
- package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
- package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js +69 -69
- package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
- package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js +139 -139
- package/dist/cjs/clients/generic/cognito-client.d.ts +23 -23
- package/dist/cjs/clients/generic/cognito-client.js +209 -209
- package/dist/cjs/clients/generic/dynamodb-client.d.ts +20 -20
- package/dist/cjs/clients/generic/dynamodb-client.js +235 -235
- package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
- package/dist/cjs/clients/generic/eventbridge-client.js +51 -51
- package/dist/cjs/clients/generic/http-client.d.ts +14 -14
- package/dist/cjs/clients/generic/http-client.js +61 -61
- package/dist/cjs/clients/generic/index.d.ts +13 -13
- package/dist/cjs/clients/generic/index.js +29 -29
- package/dist/cjs/clients/generic/lambda-invoke-client.d.ts +10 -10
- package/dist/cjs/clients/generic/lambda-invoke-client.js +39 -39
- package/dist/cjs/clients/generic/location-client.d.ts +8 -8
- package/dist/cjs/clients/generic/location-client.js +31 -31
- package/dist/cjs/clients/generic/redis-client.d.ts +33 -33
- package/dist/cjs/clients/generic/redis-client.js +191 -191
- package/dist/cjs/clients/generic/s3-client.d.ts +23 -23
- package/dist/cjs/clients/generic/s3-client.js +216 -216
- package/dist/cjs/clients/generic/singlestore-db-client.d.ts +14 -14
- package/dist/cjs/clients/generic/singlestore-db-client.js +67 -67
- package/dist/cjs/clients/generic/sqs-bundled-client.d.ts +15 -15
- package/dist/cjs/clients/generic/sqs-bundled-client.js +311 -311
- package/dist/cjs/clients/generic/sqs-bundled-client.types.d.ts +53 -53
- package/dist/cjs/clients/generic/sqs-bundled-client.types.js +17 -17
- package/dist/cjs/clients/generic/sqs-client.d.ts +53 -53
- package/dist/cjs/clients/generic/sqs-client.js +285 -285
- package/dist/cjs/clients/generic/sqs-unbundle.d.ts +32 -32
- package/dist/cjs/clients/generic/sqs-unbundle.js +144 -144
- package/dist/cjs/clients/index.d.ts +3 -3
- package/dist/cjs/clients/index.js +19 -19
- package/dist/cjs/clients/internal-api/accounts-client.d.ts +91 -91
- package/dist/cjs/clients/internal-api/accounts-client.js +129 -129
- package/dist/cjs/clients/internal-api/cache-lambda-client.d.ts +26 -26
- package/dist/cjs/clients/internal-api/cache-lambda-client.js +89 -89
- package/dist/cjs/clients/internal-api/db-management-client.d.ts +18 -18
- package/dist/cjs/clients/internal-api/db-management-client.js +36 -36
- package/dist/cjs/clients/internal-api/destinations-client.d.ts +34 -34
- package/dist/cjs/clients/internal-api/destinations-client.js +79 -79
- package/dist/cjs/clients/internal-api/event-collector-client.d.ts +20 -20
- package/dist/cjs/clients/internal-api/event-collector-client.js +36 -36
- package/dist/cjs/clients/internal-api/identity-client.d.ts +31 -31
- package/dist/cjs/clients/internal-api/identity-client.js +91 -91
- package/dist/cjs/clients/internal-api/index.d.ts +9 -9
- package/dist/cjs/clients/internal-api/index.js +25 -25
- package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +37 -37
- package/dist/cjs/clients/internal-api/shopify-app-install-client.js +81 -81
- package/dist/cjs/clients/internal-api/subscriptions-client.d.ts +26 -26
- package/dist/cjs/clients/internal-api/subscriptions-client.js +77 -77
- package/dist/cjs/clients/internal-api/users-auth-client.d.ts +35 -35
- package/dist/cjs/clients/internal-api/users-auth-client.js +110 -110
- package/dist/cjs/clients/third-party/acuity-client.d.ts +10 -10
- package/dist/cjs/clients/third-party/acuity-client.js +40 -40
- package/dist/cjs/clients/third-party/emailable-client.d.ts +7 -7
- package/dist/cjs/clients/third-party/emailable-client.js +25 -25
- package/dist/cjs/clients/third-party/exchange-rate-api-client.d.ts +17 -17
- package/dist/cjs/clients/third-party/exchange-rate-api-client.js +19 -19
- package/dist/cjs/clients/third-party/index.d.ts +5 -5
- package/dist/cjs/clients/third-party/index.js +21 -21
- package/dist/cjs/clients/third-party/loops-client.d.ts +10 -10
- package/dist/cjs/clients/third-party/loops-client.js +30 -30
- package/dist/cjs/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
- package/dist/cjs/clients/third-party/shopify/graphql-order-queries.js +4 -4
- package/dist/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
- package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +5 -5
- package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
- package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.js +161 -161
- package/dist/cjs/clients/third-party/shopify-client.d.ts +29 -29
- package/dist/cjs/clients/third-party/shopify-client.js +146 -146
- package/dist/cjs/constants/index.d.ts +1 -1
- package/dist/cjs/constants/index.js +17 -17
- package/dist/cjs/constants/sqs.d.ts +20 -20
- package/dist/cjs/constants/sqs.js +26 -26
- package/dist/cjs/helpers/account-users-helper.d.ts +2 -2
- package/dist/cjs/helpers/account-users-helper.js +22 -22
- package/dist/cjs/helpers/acuity-helper.d.ts +4 -4
- package/dist/cjs/helpers/acuity-helper.js +56 -56
- package/dist/cjs/helpers/api-key-auth-helper.d.ts +9 -9
- package/dist/cjs/helpers/api-key-auth-helper.js +40 -40
- package/dist/cjs/helpers/api-key-authorizer-helper.d.ts +36 -36
- package/dist/cjs/helpers/api-key-authorizer-helper.js +87 -87
- package/dist/cjs/helpers/identity-cache-helper.d.ts +30 -30
- package/dist/cjs/helpers/identity-cache-helper.js +253 -253
- package/dist/cjs/helpers/index.d.ts +10 -10
- package/dist/cjs/helpers/index.js +26 -26
- package/dist/cjs/helpers/input-validation-helper.d.ts +3 -3
- package/dist/cjs/helpers/input-validation-helper.js +22 -22
- package/dist/cjs/helpers/logging-helper.d.ts +16 -16
- package/dist/cjs/helpers/logging-helper.js +84 -84
- package/dist/cjs/helpers/response-helper.d.ts +18 -18
- package/dist/cjs/helpers/response-helper.js +43 -43
- package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
- package/dist/cjs/helpers/shopify-helper.js +26 -26
- package/dist/cjs/helpers/sqs-utils.d.ts +6 -6
- package/dist/cjs/helpers/sqs-utils.js +14 -14
- package/dist/cjs/index.d.ts +7 -7
- package/dist/cjs/index.js +23 -23
- package/dist/cjs/libs/api-router/index.d.ts +2 -2
- package/dist/cjs/libs/api-router/index.js +18 -18
- package/dist/cjs/libs/api-router/public-api-router.d.ts +3 -3
- package/dist/cjs/libs/api-router/public-api-router.js +36 -36
- package/dist/cjs/libs/api-router/route-matcher.d.ts +21 -21
- package/dist/cjs/libs/api-router/route-matcher.js +36 -36
- package/dist/cjs/libs/click-id-parser.d.ts +23 -23
- package/dist/cjs/libs/click-id-parser.js +49 -49
- package/dist/cjs/libs/compression.d.ts +2 -2
- package/dist/cjs/libs/compression.js +33 -33
- package/dist/cjs/libs/contacts.d.ts +7 -7
- package/dist/cjs/libs/contacts.js +152 -152
- package/dist/cjs/libs/cookie.d.ts +17 -17
- package/dist/cjs/libs/cookie.js +76 -76
- package/dist/cjs/libs/crypto.d.ts +4 -4
- package/dist/cjs/libs/crypto.js +25 -25
- package/dist/cjs/libs/csv.d.ts +2 -2
- package/dist/cjs/libs/csv.js +35 -35
- package/dist/cjs/libs/currency.d.ts +1 -1
- package/dist/cjs/libs/currency.js +29 -29
- package/dist/cjs/libs/dates.d.ts +12 -12
- package/dist/cjs/libs/dates.js +96 -96
- package/dist/cjs/libs/domain.d.ts +2 -2
- package/dist/cjs/libs/domain.js +38 -38
- package/dist/cjs/libs/emails.d.ts +8 -8
- package/dist/cjs/libs/emails.js +154 -154
- package/dist/cjs/libs/http-error.d.ts +21 -21
- package/dist/cjs/libs/http-error.js +63 -63
- package/dist/cjs/libs/http-status-codes.d.ts +58 -58
- package/dist/cjs/libs/http-status-codes.js +62 -62
- package/dist/cjs/libs/index.d.ts +19 -19
- package/dist/cjs/libs/index.js +35 -35
- package/dist/cjs/libs/numbers.d.ts +1 -1
- package/dist/cjs/libs/numbers.js +15 -15
- package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
- package/dist/cjs/libs/referrer-parser/index.js +18 -18
- package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
- package/dist/cjs/libs/referrer-parser/referrer-data.js +3307 -3307
- package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
- package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +131 -131
- package/dist/cjs/libs/strings.d.ts +3 -3
- package/dist/cjs/libs/strings.js +46 -46
- package/dist/cjs/libs/traits.d.ts +6 -6
- package/dist/cjs/libs/traits.js +65 -65
- package/dist/cjs/libs/url.d.ts +1 -1
- package/dist/cjs/libs/url.js +13 -13
- package/dist/cjs/services/acuity-api-service.d.ts +9 -9
- package/dist/cjs/services/acuity-api-service.js +73 -73
- package/dist/cjs/services/cache/generic-cached-object.d.ts +5 -5
- package/dist/cjs/services/cache/generic-cached-object.js +2 -2
- package/dist/cjs/services/cache/index.d.ts +1 -1
- package/dist/cjs/services/cache/index.js +17 -17
- package/dist/cjs/services/cache/product-cache-service.d.ts +21 -21
- package/dist/cjs/services/cache/product-cache-service.js +76 -76
- package/dist/cjs/services/currency-exchange-rate-lookup-service.d.ts +11 -12
- package/dist/cjs/services/currency-exchange-rate-lookup-service.js +66 -94
- package/dist/cjs/services/currency-exchange-rate-lookup-service.js.map +1 -1
- package/dist/cjs/services/db/accounts-db-service.d.ts +9 -9
- package/dist/cjs/services/db/accounts-db-service.js +33 -33
- package/dist/cjs/services/db/api-keys-db-service.d.ts +10 -10
- package/dist/cjs/services/db/api-keys-db-service.js +36 -36
- package/dist/cjs/services/db/contact-enrichments-db-service.d.ts +15 -15
- package/dist/cjs/services/db/contact-enrichments-db-service.js +94 -94
- package/dist/cjs/services/db/currency-exchange-rates-db-service.d.ts +21 -21
- package/dist/cjs/services/db/currency-exchange-rates-db-service.js +39 -39
- package/dist/cjs/services/db/custom-measures-db-service.d.ts +14 -14
- package/dist/cjs/services/db/custom-measures-db-service.js +48 -48
- package/dist/cjs/services/db/destinations-db-service.d.ts +13 -13
- package/dist/cjs/services/db/destinations-db-service.js +74 -74
- package/dist/cjs/services/db/identity-cache-db-service.d.ts +28 -28
- package/dist/cjs/services/db/identity-cache-db-service.js +320 -320
- package/dist/cjs/services/db/identity-cache-dynamodb-service.d.ts +44 -44
- package/dist/cjs/services/db/identity-cache-dynamodb-service.js +734 -734
- package/dist/cjs/services/db/index.d.ts +17 -19
- package/dist/cjs/services/db/index.js +33 -35
- package/dist/cjs/services/db/index.js.map +1 -1
- package/dist/cjs/services/db/log-events-db-service.d.ts +11 -11
- package/dist/cjs/services/db/log-events-db-service.js +181 -181
- package/dist/cjs/services/db/pixels-db-service.d.ts +8 -8
- package/dist/cjs/services/db/pixels-db-service.js +35 -35
- package/dist/cjs/services/db/purchasable-contacts-db-service.d.ts +9 -9
- package/dist/cjs/services/db/purchasable-contacts-db-service.js +43 -43
- package/dist/cjs/services/db/purchased-contacts/index.d.ts +2 -2
- package/dist/cjs/services/db/purchased-contacts/index.js +18 -18
- package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
- package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.js +152 -152
- package/dist/cjs/services/db/purchased-contacts/types.d.ts +11 -11
- package/dist/cjs/services/db/purchased-contacts/types.js +2 -2
- package/dist/cjs/services/db/shopify-app-installs-db-service.d.ts +10 -10
- package/dist/cjs/services/db/shopify-app-installs-db-service.js +52 -52
- package/dist/cjs/services/db/shopify-products-cache-db-service.d.ts +16 -16
- package/dist/cjs/services/db/shopify-products-cache-db-service.js +73 -73
- package/dist/cjs/services/db/subscriptions-db-service.d.ts +11 -11
- package/dist/cjs/services/db/subscriptions-db-service.js +38 -38
- package/dist/cjs/services/db/tracking-events-db-service.d.ts +21 -21
- package/dist/cjs/services/db/tracking-events-db-service.js +188 -188
- package/dist/cjs/services/db/user-accounts-db-service.d.ts +7 -7
- package/dist/cjs/services/db/user-accounts-db-service.js +17 -17
- package/dist/cjs/services/email-verification/contact-email-verification-service.d.ts +7 -7
- package/dist/cjs/services/email-verification/contact-email-verification-service.js +101 -101
- package/dist/cjs/services/email-verification/email-verification-service.d.ts +19 -19
- package/dist/cjs/services/email-verification/email-verification-service.js +131 -131
- package/dist/cjs/services/email-verification/index.d.ts +2 -2
- package/dist/cjs/services/email-verification/index.js +18 -18
- package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
- package/dist/cjs/services/eventbridge-integration-service.js +28 -28
- package/dist/cjs/services/events/index.d.ts +3 -3
- package/dist/cjs/services/events/index.js +19 -19
- package/dist/cjs/services/events/log-event-service.d.ts +19 -19
- package/dist/cjs/services/events/log-event-service.js +77 -77
- package/dist/cjs/services/events/metric-event-service.d.ts +9 -9
- package/dist/cjs/services/events/metric-event-service.js +49 -49
- package/dist/cjs/services/events/tracking-event-sqs-service.d.ts +8 -8
- package/dist/cjs/services/events/tracking-event-sqs-service.js +34 -34
- package/dist/cjs/services/generic-cache-service.d.ts +7 -7
- package/dist/cjs/services/generic-cache-service.js +33 -33
- package/dist/cjs/services/index.d.ts +10 -11
- package/dist/cjs/services/index.js +26 -27
- package/dist/cjs/services/index.js.map +1 -1
- package/dist/cjs/services/ipdata-lookup-service.d.ts +20 -20
- package/dist/cjs/services/ipdata-lookup-service.js +112 -112
- package/dist/cjs/services/shopify/index.d.ts +2 -2
- package/dist/cjs/services/shopify/index.js +18 -18
- package/dist/cjs/services/shopify/products/index.d.ts +1 -1
- package/dist/cjs/services/shopify/products/index.js +17 -17
- package/dist/cjs/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
- package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +112 -112
- package/dist/cjs/services/shopify/shopify-graphql-transformer.d.ts +8 -8
- package/dist/cjs/services/shopify/shopify-graphql-transformer.js +141 -141
- package/dist/cjs/types/acuity-types.d.ts +74 -74
- package/dist/cjs/types/acuity-types.js +2 -2
- package/dist/cjs/types/api-response.d.ts +6 -6
- package/dist/cjs/types/api-response.js +2 -2
- package/dist/cjs/types/index.d.ts +4 -4
- package/dist/cjs/types/index.js +33 -33
- package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
- package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
- package/dist/cjs/types/internal-events/index.d.ts +1 -1
- package/dist/cjs/types/internal-events/index.js +17 -17
- package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +123 -123
- package/dist/cjs/types/shopify-graphql-types/admin.generated.js +2 -2
- package/dist/cjs/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
- package/dist/cjs/types/shopify-graphql-types/admin.types.js +5311 -5311
- package/dist/cjs/types/shopify-graphql-types/index.d.ts +2 -2
- package/dist/cjs/types/shopify-graphql-types/index.js +18 -18
- package/dist/cjs/types/shopify-rest-types.d.ts +767 -767
- package/dist/cjs/types/shopify-rest-types.js +2 -2
- package/dist/cjs/utils/compression.d.ts +36 -36
- package/dist/cjs/utils/compression.js +198 -198
- package/dist/cjs/utils/custom-measure-formula-utils.d.ts +6 -6
- package/dist/cjs/utils/custom-measure-formula-utils.js +209 -209
- package/dist/cjs/utils/index.d.ts +4 -4
- package/dist/cjs/utils/index.js +20 -20
- package/dist/cjs/utils/retry-envelope.d.ts +12 -12
- package/dist/cjs/utils/retry-envelope.js +28 -28
- package/dist/cjs/utils/size.d.ts +2 -2
- package/dist/cjs/utils/size.js +49 -49
- package/dist/esm/__tests__/clients/acuity-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/acuity-client.spec.js +41 -41
- package/dist/esm/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/cross-platform-compression.spec.js +329 -329
- package/dist/esm/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/dynamodb-client.spec.js +192 -192
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +906 -906
- package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js +538 -538
- package/dist/esm/__tests__/clients/sqs-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/sqs-client.spec.js +189 -189
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +1355 -1355
- package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.js +66 -66
- package/dist/esm/__tests__/db/destinations-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/destinations-db-service.spec.js +123 -123
- package/dist/esm/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/shared-read-db-services.spec.js +87 -87
- package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.js +102 -102
- package/dist/esm/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/subscriptions-db-service.spec.js +93 -93
- package/dist/esm/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/db/user-accounts-db-service.spec.js +74 -74
- package/dist/esm/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
- package/dist/esm/__tests__/helpers/account-users-helper.spec.js +218 -218
- package/dist/esm/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
- package/dist/esm/__tests__/helpers/acuity-helper.spec.js +67 -67
- package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
- package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js +80 -80
- package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.js +674 -674
- package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1138 -1138
- package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
- package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.js +849 -849
- package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
- package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1058 -1058
- package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
- package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.js +816 -816
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +582 -582
- package/dist/esm/__tests__/libs/compress-decompress.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/compress-decompress.spec.js +14 -14
- package/dist/esm/__tests__/libs/contacts.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/contacts.spec.js +292 -292
- package/dist/esm/__tests__/libs/currency.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/currency.spec.js +218 -218
- package/dist/esm/__tests__/libs/dates.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/dates.spec.js +128 -128
- package/dist/esm/__tests__/libs/domain.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/domain.spec.js +105 -105
- package/dist/esm/__tests__/libs/numbers.spec.d.ts +1 -1
- package/dist/esm/__tests__/libs/numbers.spec.js +259 -259
- package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
- package/dist/esm/__tests__/s3-client/s3-client.spec.js +31 -31
- package/dist/esm/__tests__/services/acuity-api-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/services/acuity-api-service.spec.js +69 -69
- package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js +91 -91
- package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
- package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js +55 -55
- package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
- package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.js +33 -33
- package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
- package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js +156 -156
- package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
- package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js +67 -67
- package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
- package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js +137 -137
- package/dist/esm/clients/generic/cognito-client.d.ts +23 -23
- package/dist/esm/clients/generic/cognito-client.js +204 -204
- package/dist/esm/clients/generic/dynamodb-client.d.ts +20 -20
- package/dist/esm/clients/generic/dynamodb-client.js +231 -231
- package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
- package/dist/esm/clients/generic/eventbridge-client.js +47 -47
- package/dist/esm/clients/generic/http-client.d.ts +14 -14
- package/dist/esm/clients/generic/http-client.js +53 -53
- package/dist/esm/clients/generic/index.d.ts +13 -13
- package/dist/esm/clients/generic/index.js +13 -13
- package/dist/esm/clients/generic/lambda-invoke-client.d.ts +10 -10
- package/dist/esm/clients/generic/lambda-invoke-client.js +35 -35
- package/dist/esm/clients/generic/location-client.d.ts +8 -8
- package/dist/esm/clients/generic/location-client.js +27 -27
- package/dist/esm/clients/generic/redis-client.d.ts +33 -33
- package/dist/esm/clients/generic/redis-client.js +184 -184
- package/dist/esm/clients/generic/s3-client.d.ts +23 -23
- package/dist/esm/clients/generic/s3-client.js +209 -209
- package/dist/esm/clients/generic/singlestore-db-client.d.ts +14 -14
- package/dist/esm/clients/generic/singlestore-db-client.js +40 -40
- package/dist/esm/clients/generic/sqs-bundled-client.d.ts +15 -15
- package/dist/esm/clients/generic/sqs-bundled-client.js +307 -307
- package/dist/esm/clients/generic/sqs-bundled-client.types.d.ts +53 -53
- package/dist/esm/clients/generic/sqs-bundled-client.types.js +14 -14
- package/dist/esm/clients/generic/sqs-client.d.ts +53 -53
- package/dist/esm/clients/generic/sqs-client.js +281 -281
- package/dist/esm/clients/generic/sqs-unbundle.d.ts +32 -32
- package/dist/esm/clients/generic/sqs-unbundle.js +137 -137
- package/dist/esm/clients/index.d.ts +3 -3
- package/dist/esm/clients/index.js +3 -3
- package/dist/esm/clients/internal-api/accounts-client.d.ts +91 -91
- package/dist/esm/clients/internal-api/accounts-client.js +125 -125
- package/dist/esm/clients/internal-api/cache-lambda-client.d.ts +26 -26
- package/dist/esm/clients/internal-api/cache-lambda-client.js +85 -85
- package/dist/esm/clients/internal-api/db-management-client.d.ts +18 -18
- package/dist/esm/clients/internal-api/db-management-client.js +32 -32
- package/dist/esm/clients/internal-api/destinations-client.d.ts +34 -34
- package/dist/esm/clients/internal-api/destinations-client.js +75 -75
- package/dist/esm/clients/internal-api/event-collector-client.d.ts +20 -20
- package/dist/esm/clients/internal-api/event-collector-client.js +32 -32
- package/dist/esm/clients/internal-api/identity-client.d.ts +31 -31
- package/dist/esm/clients/internal-api/identity-client.js +87 -87
- package/dist/esm/clients/internal-api/index.d.ts +9 -9
- package/dist/esm/clients/internal-api/index.js +9 -9
- package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +37 -37
- package/dist/esm/clients/internal-api/shopify-app-install-client.js +77 -77
- package/dist/esm/clients/internal-api/subscriptions-client.d.ts +26 -26
- package/dist/esm/clients/internal-api/subscriptions-client.js +73 -73
- package/dist/esm/clients/internal-api/users-auth-client.d.ts +35 -35
- package/dist/esm/clients/internal-api/users-auth-client.js +106 -106
- package/dist/esm/clients/third-party/acuity-client.d.ts +10 -10
- package/dist/esm/clients/third-party/acuity-client.js +36 -36
- package/dist/esm/clients/third-party/emailable-client.d.ts +7 -7
- package/dist/esm/clients/third-party/emailable-client.js +21 -21
- package/dist/esm/clients/third-party/exchange-rate-api-client.d.ts +17 -17
- package/dist/esm/clients/third-party/exchange-rate-api-client.js +15 -15
- package/dist/esm/clients/third-party/index.d.ts +5 -5
- package/dist/esm/clients/third-party/index.js +5 -5
- package/dist/esm/clients/third-party/loops-client.d.ts +10 -10
- package/dist/esm/clients/third-party/loops-client.js +26 -26
- package/dist/esm/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
- package/dist/esm/clients/third-party/shopify/graphql-order-queries.js +1 -1
- package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
- package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +2 -2
- package/dist/esm/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
- package/dist/esm/clients/third-party/shopify/shopify-graphql-client.js +157 -157
- package/dist/esm/clients/third-party/shopify-client.d.ts +29 -29
- package/dist/esm/clients/third-party/shopify-client.js +142 -142
- package/dist/esm/constants/index.d.ts +1 -1
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/sqs.d.ts +20 -20
- package/dist/esm/constants/sqs.js +22 -22
- package/dist/esm/helpers/account-users-helper.d.ts +2 -2
- package/dist/esm/helpers/account-users-helper.js +18 -18
- package/dist/esm/helpers/acuity-helper.d.ts +4 -4
- package/dist/esm/helpers/acuity-helper.js +51 -51
- package/dist/esm/helpers/api-key-auth-helper.d.ts +9 -9
- package/dist/esm/helpers/api-key-auth-helper.js +35 -35
- package/dist/esm/helpers/api-key-authorizer-helper.d.ts +36 -36
- package/dist/esm/helpers/api-key-authorizer-helper.js +83 -83
- package/dist/esm/helpers/identity-cache-helper.d.ts +30 -30
- package/dist/esm/helpers/identity-cache-helper.js +248 -248
- package/dist/esm/helpers/index.d.ts +10 -10
- package/dist/esm/helpers/index.js +10 -10
- package/dist/esm/helpers/input-validation-helper.d.ts +3 -3
- package/dist/esm/helpers/input-validation-helper.js +18 -18
- package/dist/esm/helpers/logging-helper.d.ts +16 -16
- package/dist/esm/helpers/logging-helper.js +56 -56
- package/dist/esm/helpers/response-helper.d.ts +18 -18
- package/dist/esm/helpers/response-helper.js +37 -37
- package/dist/esm/helpers/shopify-helper.d.ts +9 -9
- package/dist/esm/helpers/shopify-helper.js +21 -21
- package/dist/esm/helpers/sqs-utils.d.ts +6 -6
- package/dist/esm/helpers/sqs-utils.js +9 -9
- package/dist/esm/index.d.ts +7 -7
- package/dist/esm/index.js +7 -7
- package/dist/esm/libs/api-router/index.d.ts +2 -2
- package/dist/esm/libs/api-router/index.js +2 -2
- package/dist/esm/libs/api-router/public-api-router.d.ts +3 -3
- package/dist/esm/libs/api-router/public-api-router.js +32 -32
- package/dist/esm/libs/api-router/route-matcher.d.ts +21 -21
- package/dist/esm/libs/api-router/route-matcher.js +30 -30
- package/dist/esm/libs/click-id-parser.d.ts +23 -23
- package/dist/esm/libs/click-id-parser.js +45 -45
- package/dist/esm/libs/compression.d.ts +2 -2
- package/dist/esm/libs/compression.js +25 -25
- package/dist/esm/libs/contacts.d.ts +7 -7
- package/dist/esm/libs/contacts.js +143 -143
- package/dist/esm/libs/cookie.d.ts +17 -17
- package/dist/esm/libs/cookie.js +70 -70
- package/dist/esm/libs/crypto.d.ts +4 -4
- package/dist/esm/libs/crypto.js +15 -15
- package/dist/esm/libs/csv.d.ts +2 -2
- package/dist/esm/libs/csv.js +30 -30
- package/dist/esm/libs/currency.d.ts +1 -1
- package/dist/esm/libs/currency.js +22 -22
- package/dist/esm/libs/dates.d.ts +12 -12
- package/dist/esm/libs/dates.js +83 -83
- package/dist/esm/libs/domain.d.ts +2 -2
- package/dist/esm/libs/domain.js +33 -33
- package/dist/esm/libs/emails.d.ts +8 -8
- package/dist/esm/libs/emails.js +146 -146
- package/dist/esm/libs/http-error.d.ts +21 -21
- package/dist/esm/libs/http-error.js +59 -59
- package/dist/esm/libs/http-status-codes.d.ts +58 -58
- package/dist/esm/libs/http-status-codes.js +59 -59
- package/dist/esm/libs/index.d.ts +19 -19
- package/dist/esm/libs/index.js +19 -19
- package/dist/esm/libs/numbers.d.ts +1 -1
- package/dist/esm/libs/numbers.js +11 -11
- package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
- package/dist/esm/libs/referrer-parser/index.js +2 -2
- package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
- package/dist/esm/libs/referrer-parser/referrer-data.js +3304 -3304
- package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
- package/dist/esm/libs/referrer-parser/referrer-parser-util.js +124 -124
- package/dist/esm/libs/strings.d.ts +3 -3
- package/dist/esm/libs/strings.js +40 -40
- package/dist/esm/libs/traits.d.ts +6 -6
- package/dist/esm/libs/traits.js +54 -54
- package/dist/esm/libs/url.d.ts +1 -1
- package/dist/esm/libs/url.js +9 -9
- package/dist/esm/services/acuity-api-service.d.ts +9 -9
- package/dist/esm/services/acuity-api-service.js +69 -69
- package/dist/esm/services/cache/generic-cached-object.d.ts +5 -5
- package/dist/esm/services/cache/generic-cached-object.js +1 -1
- package/dist/esm/services/cache/index.d.ts +1 -1
- package/dist/esm/services/cache/index.js +1 -1
- package/dist/esm/services/cache/product-cache-service.d.ts +21 -21
- package/dist/esm/services/cache/product-cache-service.js +68 -68
- package/dist/esm/services/currency-exchange-rate-lookup-service.d.ts +11 -12
- package/dist/esm/services/currency-exchange-rate-lookup-service.js +62 -90
- package/dist/esm/services/currency-exchange-rate-lookup-service.js.map +1 -1
- package/dist/esm/services/db/accounts-db-service.d.ts +9 -9
- package/dist/esm/services/db/accounts-db-service.js +29 -29
- package/dist/esm/services/db/api-keys-db-service.d.ts +10 -10
- package/dist/esm/services/db/api-keys-db-service.js +32 -32
- package/dist/esm/services/db/contact-enrichments-db-service.d.ts +15 -15
- package/dist/esm/services/db/contact-enrichments-db-service.js +90 -90
- package/dist/esm/services/db/currency-exchange-rates-db-service.d.ts +21 -21
- package/dist/esm/services/db/currency-exchange-rates-db-service.js +35 -35
- package/dist/esm/services/db/custom-measures-db-service.d.ts +14 -14
- package/dist/esm/services/db/custom-measures-db-service.js +44 -44
- package/dist/esm/services/db/destinations-db-service.d.ts +13 -13
- package/dist/esm/services/db/destinations-db-service.js +70 -70
- package/dist/esm/services/db/identity-cache-db-service.d.ts +28 -28
- package/dist/esm/services/db/identity-cache-db-service.js +313 -313
- package/dist/esm/services/db/identity-cache-dynamodb-service.d.ts +44 -44
- package/dist/esm/services/db/identity-cache-dynamodb-service.js +727 -727
- package/dist/esm/services/db/index.d.ts +17 -19
- package/dist/esm/services/db/index.js +17 -19
- package/dist/esm/services/db/index.js.map +1 -1
- package/dist/esm/services/db/log-events-db-service.d.ts +11 -11
- package/dist/esm/services/db/log-events-db-service.js +177 -177
- package/dist/esm/services/db/pixels-db-service.d.ts +8 -8
- package/dist/esm/services/db/pixels-db-service.js +31 -31
- package/dist/esm/services/db/purchasable-contacts-db-service.d.ts +9 -9
- package/dist/esm/services/db/purchasable-contacts-db-service.js +39 -39
- package/dist/esm/services/db/purchased-contacts/index.d.ts +2 -2
- package/dist/esm/services/db/purchased-contacts/index.js +2 -2
- package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
- package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.js +148 -148
- package/dist/esm/services/db/purchased-contacts/types.d.ts +11 -11
- package/dist/esm/services/db/purchased-contacts/types.js +1 -1
- package/dist/esm/services/db/shopify-app-installs-db-service.d.ts +10 -10
- package/dist/esm/services/db/shopify-app-installs-db-service.js +48 -48
- package/dist/esm/services/db/shopify-products-cache-db-service.d.ts +16 -16
- package/dist/esm/services/db/shopify-products-cache-db-service.js +66 -66
- package/dist/esm/services/db/subscriptions-db-service.d.ts +11 -11
- package/dist/esm/services/db/subscriptions-db-service.js +34 -34
- package/dist/esm/services/db/tracking-events-db-service.d.ts +21 -21
- package/dist/esm/services/db/tracking-events-db-service.js +184 -184
- package/dist/esm/services/db/user-accounts-db-service.d.ts +7 -7
- package/dist/esm/services/db/user-accounts-db-service.js +13 -13
- package/dist/esm/services/email-verification/contact-email-verification-service.d.ts +7 -7
- package/dist/esm/services/email-verification/contact-email-verification-service.js +97 -97
- package/dist/esm/services/email-verification/email-verification-service.d.ts +19 -19
- package/dist/esm/services/email-verification/email-verification-service.js +127 -127
- package/dist/esm/services/email-verification/index.d.ts +2 -2
- package/dist/esm/services/email-verification/index.js +2 -2
- package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
- package/dist/esm/services/eventbridge-integration-service.js +24 -24
- package/dist/esm/services/events/index.d.ts +3 -3
- package/dist/esm/services/events/index.js +3 -3
- package/dist/esm/services/events/log-event-service.d.ts +19 -19
- package/dist/esm/services/events/log-event-service.js +73 -73
- package/dist/esm/services/events/metric-event-service.d.ts +9 -9
- package/dist/esm/services/events/metric-event-service.js +45 -45
- package/dist/esm/services/events/tracking-event-sqs-service.d.ts +8 -8
- package/dist/esm/services/events/tracking-event-sqs-service.js +30 -30
- package/dist/esm/services/generic-cache-service.d.ts +7 -7
- package/dist/esm/services/generic-cache-service.js +29 -29
- package/dist/esm/services/index.d.ts +10 -11
- package/dist/esm/services/index.js +10 -11
- package/dist/esm/services/index.js.map +1 -1
- package/dist/esm/services/ipdata-lookup-service.d.ts +20 -20
- package/dist/esm/services/ipdata-lookup-service.js +108 -108
- package/dist/esm/services/shopify/index.d.ts +2 -2
- package/dist/esm/services/shopify/index.js +2 -2
- package/dist/esm/services/shopify/products/index.d.ts +1 -1
- package/dist/esm/services/shopify/products/index.js +1 -1
- package/dist/esm/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
- package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +108 -108
- package/dist/esm/services/shopify/shopify-graphql-transformer.d.ts +8 -8
- package/dist/esm/services/shopify/shopify-graphql-transformer.js +138 -138
- package/dist/esm/types/acuity-types.d.ts +74 -74
- package/dist/esm/types/acuity-types.js +1 -1
- package/dist/esm/types/api-response.d.ts +6 -6
- package/dist/esm/types/api-response.js +1 -1
- package/dist/esm/types/index.d.ts +4 -4
- package/dist/esm/types/index.js +4 -4
- package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
- package/dist/esm/types/internal-events/event-detail-types.js +24 -24
- package/dist/esm/types/internal-events/index.d.ts +1 -1
- package/dist/esm/types/internal-events/index.js +1 -1
- package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +123 -123
- package/dist/esm/types/shopify-graphql-types/admin.generated.js +1 -1
- package/dist/esm/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
- package/dist/esm/types/shopify-graphql-types/admin.types.js +5299 -5299
- package/dist/esm/types/shopify-graphql-types/index.d.ts +2 -2
- package/dist/esm/types/shopify-graphql-types/index.js +2 -2
- package/dist/esm/types/shopify-rest-types.d.ts +767 -767
- package/dist/esm/types/shopify-rest-types.js +1 -1
- package/dist/esm/utils/compression.d.ts +36 -36
- package/dist/esm/utils/compression.js +187 -187
- package/dist/esm/utils/custom-measure-formula-utils.d.ts +6 -6
- package/dist/esm/utils/custom-measure-formula-utils.js +201 -201
- package/dist/esm/utils/index.d.ts +4 -4
- package/dist/esm/utils/index.js +4 -4
- package/dist/esm/utils/retry-envelope.d.ts +12 -12
- package/dist/esm/utils/retry-envelope.js +22 -22
- package/dist/esm/utils/size.d.ts +2 -2
- package/dist/esm/utils/size.js +44 -44
- package/package.json +134 -134
- package/dist/cjs/__tests__/db/products-db-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/db/products-db-service.spec.js +0 -90
- package/dist/cjs/__tests__/db/products-db-service.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js +0 -24
- package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js +0 -3320
- package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js +0 -115
- package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js +0 -469
- package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +0 -207
- package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +0 -1
- package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +0 -1
- package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js +0 -35
- package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +0 -1
- package/dist/cjs/services/cost/cost-calculation-types.d.ts +0 -69
- package/dist/cjs/services/cost/cost-calculation-types.js +0 -20
- package/dist/cjs/services/cost/cost-calculation-types.js.map +0 -1
- package/dist/cjs/services/cost/cost-calculator-service.d.ts +0 -24
- package/dist/cjs/services/cost/cost-calculator-service.js +0 -457
- package/dist/cjs/services/cost/cost-calculator-service.js.map +0 -1
- package/dist/cjs/services/cost/cost-currency-service.d.ts +0 -6
- package/dist/cjs/services/cost/cost-currency-service.js +0 -88
- package/dist/cjs/services/cost/cost-currency-service.js.map +0 -1
- package/dist/cjs/services/cost/cost-filter-service.d.ts +0 -10
- package/dist/cjs/services/cost/cost-filter-service.js +0 -122
- package/dist/cjs/services/cost/cost-filter-service.js.map +0 -1
- package/dist/cjs/services/cost/index.d.ts +0 -5
- package/dist/cjs/services/cost/index.js +0 -22
- package/dist/cjs/services/cost/index.js.map +0 -1
- package/dist/cjs/services/cost/order-cost/index.d.ts +0 -2
- package/dist/cjs/services/cost/order-cost/index.js +0 -19
- package/dist/cjs/services/cost/order-cost/index.js.map +0 -1
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.d.ts +0 -23
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js +0 -362
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js.map +0 -1
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.d.ts +0 -37
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js +0 -3
- package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js.map +0 -1
- package/dist/cjs/services/db/products-db-service-types.d.ts +0 -10
- package/dist/cjs/services/db/products-db-service-types.js +0 -3
- package/dist/cjs/services/db/products-db-service-types.js.map +0 -1
- package/dist/cjs/services/db/products-db-service.d.ts +0 -19
- package/dist/cjs/services/db/products-db-service.js +0 -282
- package/dist/cjs/services/db/products-db-service.js.map +0 -1
- package/dist/esm/__tests__/db/products-db-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/db/products-db-service.spec.js +0 -88
- package/dist/esm/__tests__/db/products-db-service.spec.js.map +0 -1
- package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js +0 -22
- package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js.map +0 -1
- package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js +0 -3318
- package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js.map +0 -1
- package/dist/esm/__tests__/services/cost/cost-currency-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js +0 -113
- package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js.map +0 -1
- package/dist/esm/__tests__/services/cost/cost-filter-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js +0 -467
- package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js.map +0 -1
- package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +0 -205
- package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +0 -1
- package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +0 -1
- package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js +0 -33
- package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +0 -1
- package/dist/esm/services/cost/cost-calculation-types.d.ts +0 -69
- package/dist/esm/services/cost/cost-calculation-types.js +0 -16
- package/dist/esm/services/cost/cost-calculation-types.js.map +0 -1
- package/dist/esm/services/cost/cost-calculator-service.d.ts +0 -24
- package/dist/esm/services/cost/cost-calculator-service.js +0 -451
- package/dist/esm/services/cost/cost-calculator-service.js.map +0 -1
- package/dist/esm/services/cost/cost-currency-service.d.ts +0 -6
- package/dist/esm/services/cost/cost-currency-service.js +0 -85
- package/dist/esm/services/cost/cost-currency-service.js.map +0 -1
- package/dist/esm/services/cost/cost-filter-service.d.ts +0 -10
- package/dist/esm/services/cost/cost-filter-service.js +0 -119
- package/dist/esm/services/cost/cost-filter-service.js.map +0 -1
- package/dist/esm/services/cost/index.d.ts +0 -5
- package/dist/esm/services/cost/index.js +0 -6
- package/dist/esm/services/cost/index.js.map +0 -1
- package/dist/esm/services/cost/order-cost/index.d.ts +0 -2
- package/dist/esm/services/cost/order-cost/index.js +0 -3
- package/dist/esm/services/cost/order-cost/index.js.map +0 -1
- package/dist/esm/services/cost/order-cost/order-cost-resolution-service.d.ts +0 -23
- package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js +0 -356
- package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js.map +0 -1
- package/dist/esm/services/cost/order-cost/order-cost-resolution-types.d.ts +0 -37
- package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js +0 -2
- package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js.map +0 -1
- package/dist/esm/services/db/products-db-service-types.d.ts +0 -10
- package/dist/esm/services/db/products-db-service-types.js +0 -2
- package/dist/esm/services/db/products-db-service-types.js.map +0 -1
- package/dist/esm/services/db/products-db-service.d.ts +0 -19
- package/dist/esm/services/db/products-db-service.js +0 -278
- package/dist/esm/services/db/products-db-service.js.map +0 -1
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
export * from './destinations-db-service.js';
|
|
2
|
-
export * from './log-events-db-service.js';
|
|
3
|
-
export * from './pixels-db-service.js';
|
|
4
|
-
export * from './purchasable-contacts-db-service.js';
|
|
5
|
-
export * from './purchased-contacts/index.js';
|
|
6
|
-
export * from './contact-enrichments-db-service.js';
|
|
7
|
-
export * from './tracking-events-db-service.js';
|
|
8
|
-
export * from './shopify-products-cache-db-service.js';
|
|
9
|
-
export * from './shopify-app-installs-db-service.js';
|
|
10
|
-
export * from './identity-cache-db-service.js';
|
|
11
|
-
export * from './identity-cache-dynamodb-service.js';
|
|
12
|
-
export * from './currency-exchange-rates-db-service.js';
|
|
13
|
-
export * from './accounts-db-service.js';
|
|
14
|
-
export * from './subscriptions-db-service.js';
|
|
15
|
-
export * from './user-accounts-db-service.js';
|
|
16
|
-
export * from './api-keys-db-service.js';
|
|
17
|
-
export * from './custom-measures-db-service.js';
|
|
18
|
-
export * from './products-db-service.js';
|
|
19
|
-
export * from './products-db-service-types.js';
|
|
1
|
+
export * from './destinations-db-service.js';
|
|
2
|
+
export * from './log-events-db-service.js';
|
|
3
|
+
export * from './pixels-db-service.js';
|
|
4
|
+
export * from './purchasable-contacts-db-service.js';
|
|
5
|
+
export * from './purchased-contacts/index.js';
|
|
6
|
+
export * from './contact-enrichments-db-service.js';
|
|
7
|
+
export * from './tracking-events-db-service.js';
|
|
8
|
+
export * from './shopify-products-cache-db-service.js';
|
|
9
|
+
export * from './shopify-app-installs-db-service.js';
|
|
10
|
+
export * from './identity-cache-db-service.js';
|
|
11
|
+
export * from './identity-cache-dynamodb-service.js';
|
|
12
|
+
export * from './currency-exchange-rates-db-service.js';
|
|
13
|
+
export * from './accounts-db-service.js';
|
|
14
|
+
export * from './subscriptions-db-service.js';
|
|
15
|
+
export * from './user-accounts-db-service.js';
|
|
16
|
+
export * from './api-keys-db-service.js';
|
|
17
|
+
export * from './custom-measures-db-service.js';
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
export * from './destinations-db-service.js';
|
|
2
|
-
export * from './log-events-db-service.js';
|
|
3
|
-
export * from './pixels-db-service.js';
|
|
4
|
-
export * from './purchasable-contacts-db-service.js';
|
|
5
|
-
export * from './purchased-contacts/index.js';
|
|
6
|
-
export * from './contact-enrichments-db-service.js';
|
|
7
|
-
export * from './tracking-events-db-service.js';
|
|
8
|
-
export * from './shopify-products-cache-db-service.js';
|
|
9
|
-
export * from './shopify-app-installs-db-service.js';
|
|
10
|
-
export * from './identity-cache-db-service.js';
|
|
11
|
-
export * from './identity-cache-dynamodb-service.js';
|
|
12
|
-
export * from './currency-exchange-rates-db-service.js';
|
|
13
|
-
export * from './accounts-db-service.js';
|
|
14
|
-
export * from './subscriptions-db-service.js';
|
|
15
|
-
export * from './user-accounts-db-service.js';
|
|
16
|
-
export * from './api-keys-db-service.js';
|
|
17
|
-
export * from './custom-measures-db-service.js';
|
|
18
|
-
export * from './products-db-service.js';
|
|
19
|
-
export * from './products-db-service-types.js';
|
|
1
|
+
export * from './destinations-db-service.js';
|
|
2
|
+
export * from './log-events-db-service.js';
|
|
3
|
+
export * from './pixels-db-service.js';
|
|
4
|
+
export * from './purchasable-contacts-db-service.js';
|
|
5
|
+
export * from './purchased-contacts/index.js';
|
|
6
|
+
export * from './contact-enrichments-db-service.js';
|
|
7
|
+
export * from './tracking-events-db-service.js';
|
|
8
|
+
export * from './shopify-products-cache-db-service.js';
|
|
9
|
+
export * from './shopify-app-installs-db-service.js';
|
|
10
|
+
export * from './identity-cache-db-service.js';
|
|
11
|
+
export * from './identity-cache-dynamodb-service.js';
|
|
12
|
+
export * from './currency-exchange-rates-db-service.js';
|
|
13
|
+
export * from './accounts-db-service.js';
|
|
14
|
+
export * from './subscriptions-db-service.js';
|
|
15
|
+
export * from './user-accounts-db-service.js';
|
|
16
|
+
export * from './api-keys-db-service.js';
|
|
17
|
+
export * from './custom-measures-db-service.js';
|
|
20
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/db/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LogEvent, LogEventRecord } from '@adtrackify/at-tracking-event-types';
|
|
2
|
-
export declare class LogEventsDbService {
|
|
3
|
-
TABLE_NAME: string;
|
|
4
|
-
constructor(tableName: string);
|
|
5
|
-
private processResult;
|
|
6
|
-
private processResults;
|
|
7
|
-
getLogEventsByDestinationId: (indexName: string, pixelId: string, destinationId: string, limit?: number, afterCollectedAt?: string) => Promise<LogEventRecord[]>;
|
|
8
|
-
getEventDebugLogs: (indexName: string, pixelId: string, logLevel: string, destinations?: string[], sources?: string[], eventNames?: string[]) => Promise<LogEventRecord[]>;
|
|
9
|
-
putLogEvent: (logEvent: LogEvent, logGroup: string, ttlInMinutes?: number) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput | null>;
|
|
10
|
-
private buildLogEventErrorMessage;
|
|
11
|
-
}
|
|
1
|
+
import { LogEvent, LogEventRecord } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
export declare class LogEventsDbService {
|
|
3
|
+
TABLE_NAME: string;
|
|
4
|
+
constructor(tableName: string);
|
|
5
|
+
private processResult;
|
|
6
|
+
private processResults;
|
|
7
|
+
getLogEventsByDestinationId: (indexName: string, pixelId: string, destinationId: string, limit?: number, afterCollectedAt?: string) => Promise<LogEventRecord[]>;
|
|
8
|
+
getEventDebugLogs: (indexName: string, pixelId: string, logLevel: string, destinations?: string[], sources?: string[], eventNames?: string[]) => Promise<LogEventRecord[]>;
|
|
9
|
+
putLogEvent: (logEvent: LogEvent, logGroup: string, ttlInMinutes?: number) => Promise<import("@aws-sdk/lib-dynamodb").PutCommandOutput | null>;
|
|
10
|
+
private buildLogEventErrorMessage;
|
|
11
|
+
}
|
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import { DynamoDbClient } from '../../clients';
|
|
2
|
-
import { DateTime } from 'luxon';
|
|
3
|
-
import { decompressJSON } from '../../libs';
|
|
4
|
-
export class LogEventsDbService {
|
|
5
|
-
TABLE_NAME;
|
|
6
|
-
constructor(tableName) {
|
|
7
|
-
this.TABLE_NAME = tableName;
|
|
8
|
-
}
|
|
9
|
-
processResult = (logEventRecord) => {
|
|
10
|
-
if (logEventRecord?.logEventCompressed) {
|
|
11
|
-
const logEventDecompressed = decompressJSON(logEventRecord.logEventCompressed);
|
|
12
|
-
if (logEventDecompressed) {
|
|
13
|
-
logEventRecord.logEvent = logEventDecompressed;
|
|
14
|
-
delete logEventRecord.logEventCompressed;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
const destinationErrorType = logEventRecord?.logEvent?.data?.facebookErrorType;
|
|
18
|
-
const destinationErrorMessage = logEventRecord?.logEvent?.data?.facebookErrorMessage;
|
|
19
|
-
const destinationErrorCode = logEventRecord?.logEvent?.data?.facebookErrorCode;
|
|
20
|
-
return {
|
|
21
|
-
eventId: logEventRecord.eventId,
|
|
22
|
-
eventName: logEventRecord.eventName,
|
|
23
|
-
pixelId: logEventRecord.pixelId,
|
|
24
|
-
source: logEventRecord.source,
|
|
25
|
-
service: logEventRecord.service,
|
|
26
|
-
logLevel: logEventRecord.logLevel,
|
|
27
|
-
logGroup: logEventRecord.logGroup,
|
|
28
|
-
destination: logEventRecord?.destination ?? logEventRecord?.logEvent?.data?.destination,
|
|
29
|
-
destinationId: logEventRecord?.destinationId,
|
|
30
|
-
trackingEventName: logEventRecord?.trackingEventName ?? logEventRecord?.logEvent?.data?.eventName,
|
|
31
|
-
destinationTrackingEventName: logEventRecord?.destinationTrackingEventName ?? logEventRecord?.logEvent?.data?.destinationEventName,
|
|
32
|
-
responseCode: logEventRecord?.responseCode,
|
|
33
|
-
errorCode: logEventRecord?.errorCode ?? logEventRecord?.logEvent?.data?.code,
|
|
34
|
-
errorMessage: logEventRecord?.errorMessage ??
|
|
35
|
-
this.buildLogEventErrorMessage(destinationErrorType, destinationErrorMessage, destinationErrorCode),
|
|
36
|
-
sentAtEpoch: logEventRecord?.sentAtEpoch,
|
|
37
|
-
collectedAt: logEventRecord?.collectedAt,
|
|
38
|
-
expiredAt: logEventRecord?.expiredAt,
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
processResults = (logEventRecords) => {
|
|
42
|
-
return logEventRecords.map((logEventRecord) => this.processResult(logEventRecord));
|
|
43
|
-
};
|
|
44
|
-
getLogEventsByDestinationId = async (indexName, pixelId, destinationId, limit, afterCollectedAt) => {
|
|
45
|
-
const query = {
|
|
46
|
-
TableName: this.TABLE_NAME,
|
|
47
|
-
IndexName: indexName,
|
|
48
|
-
FilterExpression: 'destinationId = :destinationId',
|
|
49
|
-
KeyConditionExpression: 'pixelId = :pixelId',
|
|
50
|
-
ExpressionAttributeValues: {
|
|
51
|
-
':pixelId': pixelId,
|
|
52
|
-
':destinationId': destinationId,
|
|
53
|
-
},
|
|
54
|
-
ScanIndexForward: false,
|
|
55
|
-
};
|
|
56
|
-
if (limit) {
|
|
57
|
-
query.Limit = limit;
|
|
58
|
-
}
|
|
59
|
-
if (afterCollectedAt) {
|
|
60
|
-
query.KeyConditionExpression += ' and collectedAt > :collectedAt';
|
|
61
|
-
query.ExpressionAttributeValues[':collectedAt'] = afterCollectedAt;
|
|
62
|
-
}
|
|
63
|
-
const result = await DynamoDbClient.query(query);
|
|
64
|
-
const logEventRecords = (result?.Items ?? []);
|
|
65
|
-
return this.processResults(logEventRecords);
|
|
66
|
-
};
|
|
67
|
-
getEventDebugLogs = async (indexName, pixelId, logLevel, destinations, sources, eventNames) => {
|
|
68
|
-
const afterTime = DateTime.utc().minus({ minutes: 30 }).toJSDate().toISOString();
|
|
69
|
-
let searchQuery = '';
|
|
70
|
-
const expressionAttributeValues = {};
|
|
71
|
-
if (destinations) {
|
|
72
|
-
searchQuery += `#logEvent.#data.#destination IN (${destinations
|
|
73
|
-
.map((destination, index) => `:destination${index}`)
|
|
74
|
-
.join(', ')})`;
|
|
75
|
-
destinations.forEach((destination, index) => {
|
|
76
|
-
expressionAttributeValues[`:destination${index}`] = destination;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
if (logLevel) {
|
|
80
|
-
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} logLevel = :logLevel `;
|
|
81
|
-
expressionAttributeValues[':logLevel'] = logLevel;
|
|
82
|
-
}
|
|
83
|
-
if (sources) {
|
|
84
|
-
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} #source IN (${sources
|
|
85
|
-
.map((_, index) => `:source${index}`)
|
|
86
|
-
.join(', ')})`;
|
|
87
|
-
sources.forEach((source, index) => {
|
|
88
|
-
expressionAttributeValues[`:source${index}`] = source;
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
if (eventNames) {
|
|
92
|
-
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} #logEvent.#data.#eventName IN (${eventNames
|
|
93
|
-
.map((_, index) => `:eventName${index}`)
|
|
94
|
-
.join(', ')})`;
|
|
95
|
-
eventNames.forEach((eventName, index) => {
|
|
96
|
-
expressionAttributeValues[`:eventName${index}`] = eventName;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
const params = {
|
|
100
|
-
TableName: this.TABLE_NAME,
|
|
101
|
-
IndexName: indexName,
|
|
102
|
-
KeyConditionExpression: 'pixelId = :pixelId and collectedAt > :collectedAt ',
|
|
103
|
-
FilterExpression: searchQuery,
|
|
104
|
-
ExpressionAttributeValues: {
|
|
105
|
-
':pixelId': pixelId,
|
|
106
|
-
':collectedAt': afterTime,
|
|
107
|
-
...expressionAttributeValues,
|
|
108
|
-
},
|
|
109
|
-
ScanIndexForward: false,
|
|
110
|
-
Limit: 500,
|
|
111
|
-
};
|
|
112
|
-
if (expressionAttributeValues[':destination0']) {
|
|
113
|
-
params['ExpressionAttributeNames'] = {
|
|
114
|
-
'#logEvent': 'logEvent',
|
|
115
|
-
'#data': 'data',
|
|
116
|
-
'#destination': 'destination',
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
if (expressionAttributeValues[':source0']) {
|
|
120
|
-
params['ExpressionAttributeNames'] = {
|
|
121
|
-
...params['ExpressionAttributeNames'],
|
|
122
|
-
'#source': 'source',
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
if (expressionAttributeValues[':eventName0']) {
|
|
126
|
-
params['ExpressionAttributeNames'] = {
|
|
127
|
-
...params['ExpressionAttributeNames'],
|
|
128
|
-
'#logEvent': 'logEvent',
|
|
129
|
-
'#data': 'data',
|
|
130
|
-
'#eventName': 'eventName',
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
const result = await DynamoDbClient.query(params);
|
|
134
|
-
const logEventRecords = (result?.Items ?? []);
|
|
135
|
-
return this.processResults(logEventRecords);
|
|
136
|
-
};
|
|
137
|
-
putLogEvent = async (logEvent, logGroup, ttlInMinutes) => {
|
|
138
|
-
const logEventCopy = JSON.parse(JSON.stringify(logEvent));
|
|
139
|
-
delete logEventCopy?.data?.logStorage;
|
|
140
|
-
const expiredAt = DateTime.utc()
|
|
141
|
-
.plus({ minutes: ttlInMinutes ?? 15 })
|
|
142
|
-
.toSeconds();
|
|
143
|
-
const logEventRecord = {
|
|
144
|
-
eventId: logEventCopy.id,
|
|
145
|
-
eventName: logEventCopy.name,
|
|
146
|
-
pixelId: logEventCopy.pixelId,
|
|
147
|
-
source: logEventCopy.data?.source || '',
|
|
148
|
-
service: logEventCopy.data?.service || '',
|
|
149
|
-
logLevel: logEventCopy.data.logLevel,
|
|
150
|
-
logGroup,
|
|
151
|
-
destination: logEventCopy?.data?.destination,
|
|
152
|
-
destinationId: logEventCopy.data?.destinationId,
|
|
153
|
-
trackingEventName: logEventCopy?.data?.eventName,
|
|
154
|
-
destinationTrackingEventName: logEventCopy?.data?.destinationEventName,
|
|
155
|
-
responseCode: logEventCopy?.data?.responseCode,
|
|
156
|
-
errorCode: logEventCopy?.data?.errorCode,
|
|
157
|
-
errorMessage: this.buildLogEventErrorMessage(logEventCopy?.data?.destinationErrorType, logEventCopy?.data?.destinationErrorMessage, logEventCopy?.data?.destinationErrorCode),
|
|
158
|
-
sentAtEpoch: logEventCopy?.sentAtEpoch,
|
|
159
|
-
collectedAt: logEventCopy?.collectedAt,
|
|
160
|
-
expiredAt,
|
|
161
|
-
};
|
|
162
|
-
return await DynamoDbClient.safePut(this.TABLE_NAME, logEventRecord);
|
|
163
|
-
};
|
|
164
|
-
buildLogEventErrorMessage = (destinationErrorType, destinationErrorMessage, destinationErrorCode) => {
|
|
165
|
-
let errorMessage = '';
|
|
166
|
-
if (destinationErrorType) {
|
|
167
|
-
errorMessage += destinationErrorType;
|
|
168
|
-
}
|
|
169
|
-
if (destinationErrorMessage) {
|
|
170
|
-
errorMessage += ` ${destinationErrorMessage}`;
|
|
171
|
-
}
|
|
172
|
-
if (destinationErrorCode) {
|
|
173
|
-
errorMessage += ` code: ${destinationErrorCode}`;
|
|
174
|
-
}
|
|
175
|
-
return errorMessage.trim();
|
|
176
|
-
};
|
|
177
|
-
}
|
|
1
|
+
import { DynamoDbClient } from '../../clients';
|
|
2
|
+
import { DateTime } from 'luxon';
|
|
3
|
+
import { decompressJSON } from '../../libs';
|
|
4
|
+
export class LogEventsDbService {
|
|
5
|
+
TABLE_NAME;
|
|
6
|
+
constructor(tableName) {
|
|
7
|
+
this.TABLE_NAME = tableName;
|
|
8
|
+
}
|
|
9
|
+
processResult = (logEventRecord) => {
|
|
10
|
+
if (logEventRecord?.logEventCompressed) {
|
|
11
|
+
const logEventDecompressed = decompressJSON(logEventRecord.logEventCompressed);
|
|
12
|
+
if (logEventDecompressed) {
|
|
13
|
+
logEventRecord.logEvent = logEventDecompressed;
|
|
14
|
+
delete logEventRecord.logEventCompressed;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const destinationErrorType = logEventRecord?.logEvent?.data?.facebookErrorType;
|
|
18
|
+
const destinationErrorMessage = logEventRecord?.logEvent?.data?.facebookErrorMessage;
|
|
19
|
+
const destinationErrorCode = logEventRecord?.logEvent?.data?.facebookErrorCode;
|
|
20
|
+
return {
|
|
21
|
+
eventId: logEventRecord.eventId,
|
|
22
|
+
eventName: logEventRecord.eventName,
|
|
23
|
+
pixelId: logEventRecord.pixelId,
|
|
24
|
+
source: logEventRecord.source,
|
|
25
|
+
service: logEventRecord.service,
|
|
26
|
+
logLevel: logEventRecord.logLevel,
|
|
27
|
+
logGroup: logEventRecord.logGroup,
|
|
28
|
+
destination: logEventRecord?.destination ?? logEventRecord?.logEvent?.data?.destination,
|
|
29
|
+
destinationId: logEventRecord?.destinationId,
|
|
30
|
+
trackingEventName: logEventRecord?.trackingEventName ?? logEventRecord?.logEvent?.data?.eventName,
|
|
31
|
+
destinationTrackingEventName: logEventRecord?.destinationTrackingEventName ?? logEventRecord?.logEvent?.data?.destinationEventName,
|
|
32
|
+
responseCode: logEventRecord?.responseCode,
|
|
33
|
+
errorCode: logEventRecord?.errorCode ?? logEventRecord?.logEvent?.data?.code,
|
|
34
|
+
errorMessage: logEventRecord?.errorMessage ??
|
|
35
|
+
this.buildLogEventErrorMessage(destinationErrorType, destinationErrorMessage, destinationErrorCode),
|
|
36
|
+
sentAtEpoch: logEventRecord?.sentAtEpoch,
|
|
37
|
+
collectedAt: logEventRecord?.collectedAt,
|
|
38
|
+
expiredAt: logEventRecord?.expiredAt,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
processResults = (logEventRecords) => {
|
|
42
|
+
return logEventRecords.map((logEventRecord) => this.processResult(logEventRecord));
|
|
43
|
+
};
|
|
44
|
+
getLogEventsByDestinationId = async (indexName, pixelId, destinationId, limit, afterCollectedAt) => {
|
|
45
|
+
const query = {
|
|
46
|
+
TableName: this.TABLE_NAME,
|
|
47
|
+
IndexName: indexName,
|
|
48
|
+
FilterExpression: 'destinationId = :destinationId',
|
|
49
|
+
KeyConditionExpression: 'pixelId = :pixelId',
|
|
50
|
+
ExpressionAttributeValues: {
|
|
51
|
+
':pixelId': pixelId,
|
|
52
|
+
':destinationId': destinationId,
|
|
53
|
+
},
|
|
54
|
+
ScanIndexForward: false,
|
|
55
|
+
};
|
|
56
|
+
if (limit) {
|
|
57
|
+
query.Limit = limit;
|
|
58
|
+
}
|
|
59
|
+
if (afterCollectedAt) {
|
|
60
|
+
query.KeyConditionExpression += ' and collectedAt > :collectedAt';
|
|
61
|
+
query.ExpressionAttributeValues[':collectedAt'] = afterCollectedAt;
|
|
62
|
+
}
|
|
63
|
+
const result = await DynamoDbClient.query(query);
|
|
64
|
+
const logEventRecords = (result?.Items ?? []);
|
|
65
|
+
return this.processResults(logEventRecords);
|
|
66
|
+
};
|
|
67
|
+
getEventDebugLogs = async (indexName, pixelId, logLevel, destinations, sources, eventNames) => {
|
|
68
|
+
const afterTime = DateTime.utc().minus({ minutes: 30 }).toJSDate().toISOString();
|
|
69
|
+
let searchQuery = '';
|
|
70
|
+
const expressionAttributeValues = {};
|
|
71
|
+
if (destinations) {
|
|
72
|
+
searchQuery += `#logEvent.#data.#destination IN (${destinations
|
|
73
|
+
.map((destination, index) => `:destination${index}`)
|
|
74
|
+
.join(', ')})`;
|
|
75
|
+
destinations.forEach((destination, index) => {
|
|
76
|
+
expressionAttributeValues[`:destination${index}`] = destination;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (logLevel) {
|
|
80
|
+
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} logLevel = :logLevel `;
|
|
81
|
+
expressionAttributeValues[':logLevel'] = logLevel;
|
|
82
|
+
}
|
|
83
|
+
if (sources) {
|
|
84
|
+
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} #source IN (${sources
|
|
85
|
+
.map((_, index) => `:source${index}`)
|
|
86
|
+
.join(', ')})`;
|
|
87
|
+
sources.forEach((source, index) => {
|
|
88
|
+
expressionAttributeValues[`:source${index}`] = source;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (eventNames) {
|
|
92
|
+
searchQuery += `${searchQuery.length > 0 ? ' and ' : ' '} #logEvent.#data.#eventName IN (${eventNames
|
|
93
|
+
.map((_, index) => `:eventName${index}`)
|
|
94
|
+
.join(', ')})`;
|
|
95
|
+
eventNames.forEach((eventName, index) => {
|
|
96
|
+
expressionAttributeValues[`:eventName${index}`] = eventName;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const params = {
|
|
100
|
+
TableName: this.TABLE_NAME,
|
|
101
|
+
IndexName: indexName,
|
|
102
|
+
KeyConditionExpression: 'pixelId = :pixelId and collectedAt > :collectedAt ',
|
|
103
|
+
FilterExpression: searchQuery,
|
|
104
|
+
ExpressionAttributeValues: {
|
|
105
|
+
':pixelId': pixelId,
|
|
106
|
+
':collectedAt': afterTime,
|
|
107
|
+
...expressionAttributeValues,
|
|
108
|
+
},
|
|
109
|
+
ScanIndexForward: false,
|
|
110
|
+
Limit: 500,
|
|
111
|
+
};
|
|
112
|
+
if (expressionAttributeValues[':destination0']) {
|
|
113
|
+
params['ExpressionAttributeNames'] = {
|
|
114
|
+
'#logEvent': 'logEvent',
|
|
115
|
+
'#data': 'data',
|
|
116
|
+
'#destination': 'destination',
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (expressionAttributeValues[':source0']) {
|
|
120
|
+
params['ExpressionAttributeNames'] = {
|
|
121
|
+
...params['ExpressionAttributeNames'],
|
|
122
|
+
'#source': 'source',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (expressionAttributeValues[':eventName0']) {
|
|
126
|
+
params['ExpressionAttributeNames'] = {
|
|
127
|
+
...params['ExpressionAttributeNames'],
|
|
128
|
+
'#logEvent': 'logEvent',
|
|
129
|
+
'#data': 'data',
|
|
130
|
+
'#eventName': 'eventName',
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
const result = await DynamoDbClient.query(params);
|
|
134
|
+
const logEventRecords = (result?.Items ?? []);
|
|
135
|
+
return this.processResults(logEventRecords);
|
|
136
|
+
};
|
|
137
|
+
putLogEvent = async (logEvent, logGroup, ttlInMinutes) => {
|
|
138
|
+
const logEventCopy = JSON.parse(JSON.stringify(logEvent));
|
|
139
|
+
delete logEventCopy?.data?.logStorage;
|
|
140
|
+
const expiredAt = DateTime.utc()
|
|
141
|
+
.plus({ minutes: ttlInMinutes ?? 15 })
|
|
142
|
+
.toSeconds();
|
|
143
|
+
const logEventRecord = {
|
|
144
|
+
eventId: logEventCopy.id,
|
|
145
|
+
eventName: logEventCopy.name,
|
|
146
|
+
pixelId: logEventCopy.pixelId,
|
|
147
|
+
source: logEventCopy.data?.source || '',
|
|
148
|
+
service: logEventCopy.data?.service || '',
|
|
149
|
+
logLevel: logEventCopy.data.logLevel,
|
|
150
|
+
logGroup,
|
|
151
|
+
destination: logEventCopy?.data?.destination,
|
|
152
|
+
destinationId: logEventCopy.data?.destinationId,
|
|
153
|
+
trackingEventName: logEventCopy?.data?.eventName,
|
|
154
|
+
destinationTrackingEventName: logEventCopy?.data?.destinationEventName,
|
|
155
|
+
responseCode: logEventCopy?.data?.responseCode,
|
|
156
|
+
errorCode: logEventCopy?.data?.errorCode,
|
|
157
|
+
errorMessage: this.buildLogEventErrorMessage(logEventCopy?.data?.destinationErrorType, logEventCopy?.data?.destinationErrorMessage, logEventCopy?.data?.destinationErrorCode),
|
|
158
|
+
sentAtEpoch: logEventCopy?.sentAtEpoch,
|
|
159
|
+
collectedAt: logEventCopy?.collectedAt,
|
|
160
|
+
expiredAt,
|
|
161
|
+
};
|
|
162
|
+
return await DynamoDbClient.safePut(this.TABLE_NAME, logEventRecord);
|
|
163
|
+
};
|
|
164
|
+
buildLogEventErrorMessage = (destinationErrorType, destinationErrorMessage, destinationErrorCode) => {
|
|
165
|
+
let errorMessage = '';
|
|
166
|
+
if (destinationErrorType) {
|
|
167
|
+
errorMessage += destinationErrorType;
|
|
168
|
+
}
|
|
169
|
+
if (destinationErrorMessage) {
|
|
170
|
+
errorMessage += ` ${destinationErrorMessage}`;
|
|
171
|
+
}
|
|
172
|
+
if (destinationErrorCode) {
|
|
173
|
+
errorMessage += ` code: ${destinationErrorCode}`;
|
|
174
|
+
}
|
|
175
|
+
return errorMessage.trim();
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
178
|
//# sourceMappingURL=log-events-db-service.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Pixel } from '@adtrackify/at-tracking-event-types';
|
|
2
|
-
export declare class PixelsDbService {
|
|
3
|
-
TABLE_NAME: string;
|
|
4
|
-
TABLE_KEY: string;
|
|
5
|
-
constructor(tableName: string);
|
|
6
|
-
getPixelById: (id: string) => Promise<Pixel | null>;
|
|
7
|
-
getPixelsByAccountId: (indexName: string, accountId: string) => Promise<Pixel[]>;
|
|
8
|
-
}
|
|
1
|
+
import { Pixel } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
export declare class PixelsDbService {
|
|
3
|
+
TABLE_NAME: string;
|
|
4
|
+
TABLE_KEY: string;
|
|
5
|
+
constructor(tableName: string);
|
|
6
|
+
getPixelById: (id: string) => Promise<Pixel | null>;
|
|
7
|
+
getPixelsByAccountId: (indexName: string, accountId: string) => Promise<Pixel[]>;
|
|
8
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { DynamoDbClient } from '../../clients/generic/dynamodb-client.js';
|
|
2
|
-
export class PixelsDbService {
|
|
3
|
-
TABLE_NAME;
|
|
4
|
-
TABLE_KEY;
|
|
5
|
-
constructor(tableName) {
|
|
6
|
-
this.TABLE_NAME = tableName;
|
|
7
|
-
this.TABLE_KEY = 'id';
|
|
8
|
-
}
|
|
9
|
-
getPixelById = async (id) => {
|
|
10
|
-
const query = {
|
|
11
|
-
TableName: this.TABLE_NAME,
|
|
12
|
-
Key: {
|
|
13
|
-
id,
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const pixel = await DynamoDbClient.get(query);
|
|
17
|
-
return pixel?.Item ?? null;
|
|
18
|
-
};
|
|
19
|
-
getPixelsByAccountId = async (indexName, accountId) => {
|
|
20
|
-
const query = {
|
|
21
|
-
TableName: this.TABLE_NAME,
|
|
22
|
-
IndexName: indexName,
|
|
23
|
-
KeyConditionExpression: 'accountId = :accountId',
|
|
24
|
-
ExpressionAttributeValues: {
|
|
25
|
-
':accountId': accountId,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
const pixels = await DynamoDbClient.queryAll(query);
|
|
29
|
-
return pixels || [];
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
import { DynamoDbClient } from '../../clients/generic/dynamodb-client.js';
|
|
2
|
+
export class PixelsDbService {
|
|
3
|
+
TABLE_NAME;
|
|
4
|
+
TABLE_KEY;
|
|
5
|
+
constructor(tableName) {
|
|
6
|
+
this.TABLE_NAME = tableName;
|
|
7
|
+
this.TABLE_KEY = 'id';
|
|
8
|
+
}
|
|
9
|
+
getPixelById = async (id) => {
|
|
10
|
+
const query = {
|
|
11
|
+
TableName: this.TABLE_NAME,
|
|
12
|
+
Key: {
|
|
13
|
+
id,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const pixel = await DynamoDbClient.get(query);
|
|
17
|
+
return pixel?.Item ?? null;
|
|
18
|
+
};
|
|
19
|
+
getPixelsByAccountId = async (indexName, accountId) => {
|
|
20
|
+
const query = {
|
|
21
|
+
TableName: this.TABLE_NAME,
|
|
22
|
+
IndexName: indexName,
|
|
23
|
+
KeyConditionExpression: 'accountId = :accountId',
|
|
24
|
+
ExpressionAttributeValues: {
|
|
25
|
+
':accountId': accountId,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const pixels = await DynamoDbClient.queryAll(query);
|
|
29
|
+
return pixels || [];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
32
|
//# sourceMappingURL=pixels-db-service.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CONTACT_ACQUISITION_SOURCE, CONTACT_SOURCE_ID, EmailableVerifyEmailResponse, IPDataResponse, PurchasableContact, ThirdPartyContact } from '@adtrackify/at-tracking-event-types';
|
|
2
|
-
export declare class PurchasableContactsDbService {
|
|
3
|
-
TABLE_NAME: string;
|
|
4
|
-
TABLE_KEY: string;
|
|
5
|
-
constructor(tableName: string, purchasableContactsKey: string);
|
|
6
|
-
buildPurchasableContact: (contact: ThirdPartyContact, source: CONTACT_ACQUISITION_SOURCE, sourceId: CONTACT_SOURCE_ID, emailVerification: EmailableVerifyEmailResponse, ipLookupResponse?: IPDataResponse) => PurchasableContact;
|
|
7
|
-
getPurchasableContact: (id: string) => Promise<PurchasableContact>;
|
|
8
|
-
putPurchasableContact: (purchasableContact: PurchasableContact) => Promise<PurchasableContact>;
|
|
9
|
-
}
|
|
1
|
+
import { CONTACT_ACQUISITION_SOURCE, CONTACT_SOURCE_ID, EmailableVerifyEmailResponse, IPDataResponse, PurchasableContact, ThirdPartyContact } from '@adtrackify/at-tracking-event-types';
|
|
2
|
+
export declare class PurchasableContactsDbService {
|
|
3
|
+
TABLE_NAME: string;
|
|
4
|
+
TABLE_KEY: string;
|
|
5
|
+
constructor(tableName: string, purchasableContactsKey: string);
|
|
6
|
+
buildPurchasableContact: (contact: ThirdPartyContact, source: CONTACT_ACQUISITION_SOURCE, sourceId: CONTACT_SOURCE_ID, emailVerification: EmailableVerifyEmailResponse, ipLookupResponse?: IPDataResponse) => PurchasableContact;
|
|
7
|
+
getPurchasableContact: (id: string) => Promise<PurchasableContact>;
|
|
8
|
+
putPurchasableContact: (purchasableContact: PurchasableContact) => Promise<PurchasableContact>;
|
|
9
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { DynamoDbClient } from '../../clients';
|
|
2
|
-
import { getCurrentTimestamp, HttpError } from '../../libs';
|
|
3
|
-
export class PurchasableContactsDbService {
|
|
4
|
-
TABLE_NAME;
|
|
5
|
-
TABLE_KEY;
|
|
6
|
-
constructor(tableName, purchasableContactsKey) {
|
|
7
|
-
this.TABLE_NAME = tableName;
|
|
8
|
-
this.TABLE_KEY = purchasableContactsKey;
|
|
9
|
-
}
|
|
10
|
-
buildPurchasableContact = (contact, source, sourceId, emailVerification, ipLookupResponse) => {
|
|
11
|
-
const currentTimestamp = getCurrentTimestamp();
|
|
12
|
-
const purchasableContact = {
|
|
13
|
-
...contact,
|
|
14
|
-
email: contact?.emailAddress,
|
|
15
|
-
ipAddress: contact?.ipAddress,
|
|
16
|
-
ipAddressEnrichment: ipLookupResponse,
|
|
17
|
-
url: contact?.url,
|
|
18
|
-
source,
|
|
19
|
-
sourceId,
|
|
20
|
-
contact,
|
|
21
|
-
emailVerification,
|
|
22
|
-
emailStatus: emailVerification?.state,
|
|
23
|
-
createdAt: currentTimestamp,
|
|
24
|
-
updatedAt: currentTimestamp,
|
|
25
|
-
};
|
|
26
|
-
return purchasableContact;
|
|
27
|
-
};
|
|
28
|
-
getPurchasableContact = async (id) => {
|
|
29
|
-
const purchasableContact = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
|
|
30
|
-
if (!purchasableContact) {
|
|
31
|
-
throw HttpError.notFound();
|
|
32
|
-
}
|
|
33
|
-
return purchasableContact;
|
|
34
|
-
};
|
|
35
|
-
putPurchasableContact = async (purchasableContact) => {
|
|
36
|
-
await DynamoDbClient.safePut(this.TABLE_NAME, purchasableContact);
|
|
37
|
-
return purchasableContact;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
1
|
+
import { DynamoDbClient } from '../../clients';
|
|
2
|
+
import { getCurrentTimestamp, HttpError } from '../../libs';
|
|
3
|
+
export class PurchasableContactsDbService {
|
|
4
|
+
TABLE_NAME;
|
|
5
|
+
TABLE_KEY;
|
|
6
|
+
constructor(tableName, purchasableContactsKey) {
|
|
7
|
+
this.TABLE_NAME = tableName;
|
|
8
|
+
this.TABLE_KEY = purchasableContactsKey;
|
|
9
|
+
}
|
|
10
|
+
buildPurchasableContact = (contact, source, sourceId, emailVerification, ipLookupResponse) => {
|
|
11
|
+
const currentTimestamp = getCurrentTimestamp();
|
|
12
|
+
const purchasableContact = {
|
|
13
|
+
...contact,
|
|
14
|
+
email: contact?.emailAddress,
|
|
15
|
+
ipAddress: contact?.ipAddress,
|
|
16
|
+
ipAddressEnrichment: ipLookupResponse,
|
|
17
|
+
url: contact?.url,
|
|
18
|
+
source,
|
|
19
|
+
sourceId,
|
|
20
|
+
contact,
|
|
21
|
+
emailVerification,
|
|
22
|
+
emailStatus: emailVerification?.state,
|
|
23
|
+
createdAt: currentTimestamp,
|
|
24
|
+
updatedAt: currentTimestamp,
|
|
25
|
+
};
|
|
26
|
+
return purchasableContact;
|
|
27
|
+
};
|
|
28
|
+
getPurchasableContact = async (id) => {
|
|
29
|
+
const purchasableContact = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
|
|
30
|
+
if (!purchasableContact) {
|
|
31
|
+
throw HttpError.notFound();
|
|
32
|
+
}
|
|
33
|
+
return purchasableContact;
|
|
34
|
+
};
|
|
35
|
+
putPurchasableContact = async (purchasableContact) => {
|
|
36
|
+
await DynamoDbClient.safePut(this.TABLE_NAME, purchasableContact);
|
|
37
|
+
return purchasableContact;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
40
|
//# sourceMappingURL=purchasable-contacts-db-service.js.map
|