@roketus/loyalty-js-sdk 4.35.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/README.md +8 -0
- package/dist/cjs/IContainerRegistry.d.ts +7 -0
- package/dist/cjs/api/analytics/createEvent.d.ts +2 -0
- package/dist/cjs/api/analytics/getActiveUsersData.d.ts +2 -0
- package/dist/cjs/api/analytics/getCardConversionStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getGeneralCardsData.d.ts +2 -0
- package/dist/cjs/api/analytics/getIssuedCardsStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getMyNotificationStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getPointsAddedStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getPointsData.d.ts +2 -0
- package/dist/cjs/api/analytics/getPointsUsedStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getPurchasesStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getUniquePurchasesStats.d.ts +2 -0
- package/dist/cjs/api/analytics/getUserCompositionStats.d.ts +2 -0
- package/dist/cjs/api/analytics/utils.d.ts +1 -0
- package/dist/cjs/api/auth/getJWTByApiKey.d.ts +2 -0
- package/dist/cjs/api/auth/getUserData.d.ts +2 -0
- package/dist/cjs/api/auth/signInByPhone.d.ts +2 -0
- package/dist/cjs/api/auth/validatePhoneOtp.d.ts +2 -0
- package/dist/cjs/api/campaign/createCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/createEmailTemplate.d.ts +16 -0
- package/dist/cjs/api/campaign/createPassPushTemplate.d.ts +15 -0
- package/dist/cjs/api/campaign/createSMSTemplate.d.ts +14 -0
- package/dist/cjs/api/campaign/createWebPushTemplate.d.ts +15 -0
- package/dist/cjs/api/campaign/deleteTemplate.d.ts +2 -0
- package/dist/cjs/api/campaign/deleteTemplateFromCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/getCampaignById.d.ts +2 -0
- package/dist/cjs/api/campaign/getMyCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/getMyCohorts.d.ts +2 -0
- package/dist/cjs/api/campaign/getMyTemplates.d.ts +2 -0
- package/dist/cjs/api/campaign/getTemplateById.d.ts +2 -0
- package/dist/cjs/api/campaign/runCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/setCohortToCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/setTemplateToCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/setTemplatesToCampaign.d.ts +2 -0
- package/dist/cjs/api/campaign/updateEmailTemplate.d.ts +2 -0
- package/dist/cjs/api/campaign/updatePassPushTemplate.d.ts +2 -0
- package/dist/cjs/api/campaign/updateSMSTemplate.d.ts +2 -0
- package/dist/cjs/api/campaign/updateWebPushTemplate.d.ts +2 -0
- package/dist/cjs/api/card/addPoints.d.ts +2 -0
- package/dist/cjs/api/card/addReserve.d.ts +2 -0
- package/dist/cjs/api/card/createAnonymousCard.d.ts +2 -0
- package/dist/cjs/api/card/downloadAndroidCard.d.ts +2 -0
- package/dist/cjs/api/card/downloadAnonymousCard.d.ts +2 -0
- package/dist/cjs/api/card/downloadCardFromPromise.d.ts +4 -0
- package/dist/cjs/api/card/downloadIOSCard.d.ts +2 -0
- package/dist/cjs/api/card/getBalanceHistory.d.ts +3 -0
- package/dist/cjs/api/card/getBonuses.d.ts +2 -0
- package/dist/cjs/api/card/getReferral.d.ts +2 -0
- package/dist/cjs/api/card/getUserCard.d.ts +2 -0
- package/dist/cjs/api/card/restoreCard.d.ts +2 -0
- package/dist/cjs/api/card/setTypeCard.d.ts +2 -0
- package/dist/cjs/api/card/spendPoints.d.ts +2 -0
- package/dist/cjs/api/card/updateCard.d.ts +2 -0
- package/dist/cjs/api/card/updateDiscountPercent.d.ts +2 -0
- package/dist/cjs/api/cardManagement/createCard.d.ts +2 -0
- package/dist/cjs/api/cardManagement/deactivateCard.d.ts +2 -0
- package/dist/cjs/api/cardManagement/issueCard.d.ts +2 -0
- package/dist/cjs/api/cardManagement/listCards.d.ts +2 -0
- package/dist/cjs/api/cardManagement/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/cardManagement/updateCustomParams.d.ts +2 -0
- package/dist/cjs/api/cardManagement/updateExpirationDate.d.ts +2 -0
- package/dist/cjs/api/excludes/createExclude.d.ts +2 -0
- package/dist/cjs/api/excludes/deleteExclude.d.ts +2 -0
- package/dist/cjs/api/excludes/getExclude.d.ts +2 -0
- package/dist/cjs/api/excludes/listExcludes.d.ts +2 -0
- package/dist/cjs/api/excludes/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/excludes/updateExclude.d.ts +2 -0
- package/dist/cjs/api/issuer/authByPassToken.d.ts +2 -0
- package/dist/cjs/api/issuer/authByToken.d.ts +2 -0
- package/dist/cjs/api/issuer/createIssuer.d.ts +2 -0
- package/dist/cjs/api/issuer/dispatchCustomEvent.d.ts +2 -0
- package/dist/cjs/api/issuer/getCardBonuses.d.ts +13 -0
- package/dist/cjs/api/issuer/getCardById.d.ts +2 -0
- package/dist/cjs/api/issuer/getCardByPhone.d.ts +2 -0
- package/dist/cjs/api/issuer/getCardSpends.d.ts +2 -0
- package/dist/cjs/api/issuer/getIssuer.d.ts +2 -0
- package/dist/cjs/api/issuer/refreshApiKey.d.ts +2 -0
- package/dist/cjs/api/issuer/sendNotificationToCards.d.ts +2 -0
- package/dist/cjs/api/issuer/sendPushNotification.d.ts +3 -0
- package/dist/cjs/api/issuer/sendToAllIssuerCards.d.ts +2 -0
- package/dist/cjs/api/issuer/setCardName.d.ts +2 -0
- package/dist/cjs/api/issuer/setSettings.d.ts +2 -0
- package/dist/cjs/api/logger/logDebug.d.ts +2 -0
- package/dist/cjs/api/logger/logError.d.ts +2 -0
- package/dist/cjs/api/logger/logInfo.d.ts +2 -0
- package/dist/cjs/api/logger/setup.d.ts +3 -0
- package/dist/cjs/api/notification/listEmailTemplates.d.ts +2 -0
- package/dist/cjs/api/notification/sendCompanyEmailByEvent.d.ts +2 -0
- package/dist/cjs/api/notification/sendCompanySmsByEvent.d.ts +2 -0
- package/dist/cjs/api/notification/sendEmailByEvent.d.ts +2 -0
- package/dist/cjs/api/notification/subscribeToNotifications.d.ts +2 -0
- package/dist/cjs/api/order/closeOrder.d.ts +2 -0
- package/dist/cjs/api/order/openOrder.d.ts +2 -0
- package/dist/cjs/api/order/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/products/categoryResultSerializer.d.ts +1 -0
- package/dist/cjs/api/products/getCategoryById.d.ts +2 -0
- package/dist/cjs/api/products/getProductById.d.ts +2 -0
- package/dist/cjs/api/products/productResultSerializer.d.ts +1 -0
- package/dist/cjs/api/products/searchCategories.d.ts +2 -0
- package/dist/cjs/api/products/searchProducts.d.ts +2 -0
- package/dist/cjs/api/promocode/archivePromocode.d.ts +2 -0
- package/dist/cjs/api/promocode/createPromocode.d.ts +2 -0
- package/dist/cjs/api/promocode/getPromocodeById.d.ts +2 -0
- package/dist/cjs/api/promocode/listPromocodes.d.ts +2 -0
- package/dist/cjs/api/promocode/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/promocode/unarchivePromocode.d.ts +2 -0
- package/dist/cjs/api/promocode/updatePromocode.d.ts +2 -0
- package/dist/cjs/api/promocode/usePromocode.d.ts +2 -0
- package/dist/cjs/api/referralProgram/archiveRefProgram.d.ts +2 -0
- package/dist/cjs/api/referralProgram/createRefProgram.d.ts +2 -0
- package/dist/cjs/api/referralProgram/getRefProgram.d.ts +2 -0
- package/dist/cjs/api/referralProgram/getRefProgramStats.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/addInfluencer.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/deleteInfluencer.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/getInfluencer.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/getStatsByInfluencer.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/listInfluencers.d.ts +2 -0
- package/dist/cjs/api/referralProgram/influencers/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/referralProgram/influencers/updateInfluencer.d.ts +2 -0
- package/dist/cjs/api/referralProgram/listRefPrograms.d.ts +2 -0
- package/dist/cjs/api/referralProgram/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/referralProgram/unarchiveRefProgram.d.ts +2 -0
- package/dist/cjs/api/referralProgram/updateRefProgram.d.ts +2 -0
- package/dist/cjs/api/shortLink/createLink.d.ts +2 -0
- package/dist/cjs/api/shortLink/deleteLink.d.ts +2 -0
- package/dist/cjs/api/shortLink/editLink.d.ts +2 -0
- package/dist/cjs/api/shortLink/listLinks.d.ts +2 -0
- package/dist/cjs/api/shortLink/resultSerializer.d.ts +1 -0
- package/dist/cjs/api/shortLink/viewLink.d.ts +2 -0
- package/dist/cjs/api/shortLink/wait.d.ts +1 -0
- package/dist/cjs/api/shortLinkAction/createLinkAction.d.ts +2 -0
- package/dist/cjs/api/shortLinkAction/deleteLinkAction.d.ts +2 -0
- package/dist/cjs/api/shortLinkAction/editLinkAction.d.ts +2 -0
- package/dist/cjs/api/signup/acceptTerms.d.ts +2 -0
- package/dist/cjs/api/signup/activateEmail.d.ts +2 -0
- package/dist/cjs/api/signup/activatePhone.d.ts +2 -0
- package/dist/cjs/api/signup/resendActivationCode.d.ts +2 -0
- package/dist/cjs/api/signup/setBirthdate.d.ts +2 -0
- package/dist/cjs/api/signup/setEmail.d.ts +2 -0
- package/dist/cjs/api/signup/setEmailWithoutActivation.d.ts +2 -0
- package/dist/cjs/api/signup/setPhone.d.ts +2 -0
- package/dist/cjs/api/signup/setProfile.d.ts +2 -0
- package/dist/cjs/api/signup/skipEmail.d.ts +2 -0
- package/dist/cjs/api/signup/skipEmailActivation.d.ts +2 -0
- package/dist/cjs/api/signup/skipProfile.d.ts +2 -0
- package/dist/cjs/api/telemetry/send.d.ts +2 -0
- package/dist/cjs/api/tiers/getAllTiers.d.ts +2 -0
- package/dist/cjs/api/tiers/getTiersByCard.d.ts +2 -0
- package/dist/cjs/api/tiers/setTierByCard.d.ts +2 -0
- package/dist/cjs/api/transactions/getTransactionsByCard.d.ts +2 -0
- package/dist/cjs/api/url/getShortLink.d.ts +2 -0
- package/dist/cjs/api/user/changeEmail.d.ts +2 -0
- package/dist/cjs/api/user/changePhone.d.ts +2 -0
- package/dist/cjs/api/user/changeProfileData.d.ts +2 -0
- package/dist/cjs/api/user/createUser.d.ts +2 -0
- package/dist/cjs/api/user/getProfile.d.ts +2 -0
- package/dist/cjs/api/user/updateProfileByIssuer.d.ts +2 -0
- package/dist/cjs/api/user/validateNewPhoneOtp.d.ts +2 -0
- package/dist/cjs/clients/anonymousUserClient.d.ts +2 -0
- package/dist/cjs/clients/anonymousUserClientWithIssuer.d.ts +2 -0
- package/dist/cjs/clients/issuerClient.d.ts +1 -0
- package/dist/cjs/clients/setIssuer.d.ts +3 -0
- package/dist/cjs/clients/setIssuerToken.d.ts +2 -0
- package/dist/cjs/clients/setUserToken.d.ts +2 -0
- package/dist/cjs/clients/timeout.d.ts +1 -0
- package/dist/cjs/clients/url.d.ts +1 -0
- package/dist/cjs/clients/userClient.d.ts +1 -0
- package/dist/cjs/diContainer/container.d.ts +7 -0
- package/dist/cjs/diContainer/initializeDependencies.d.ts +1 -0
- package/dist/cjs/index.d.ts +59 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/interfaces/IRequestWithCancel.d.ts +4 -0
- package/dist/cjs/interfaces/IRequestWithCancelAndData.d.ts +5 -0
- package/dist/cjs/interfaces/ISDK.d.ts +232 -0
- package/dist/cjs/interfaces/I_Deserialized_Response_DTO.d.ts +5 -0
- package/dist/cjs/interfaces/I_JSON_API_ResponseDTO.d.ts +14 -0
- package/dist/cjs/interfaces/JsonApiRequestDTO.d.ts +5 -0
- package/dist/cjs/interfaces/analyticsInterfaces.d.ts +86 -0
- package/dist/cjs/interfaces/authInterfaces.d.ts +39 -0
- package/dist/cjs/interfaces/campaigns/campaignInterfaces.d.ts +174 -0
- package/dist/cjs/interfaces/campaigns/common.d.ts +74 -0
- package/dist/cjs/interfaces/campaigns/getByID.d.ts +9 -0
- package/dist/cjs/interfaces/campaigns/getMyCampaigns.d.ts +8 -0
- package/dist/cjs/interfaces/campaigns/index.d.ts +4 -0
- package/dist/cjs/interfaces/card/IGetBonuses.d.ts +7 -0
- package/dist/cjs/interfaces/cardInterfaces.d.ts +128 -0
- package/dist/cjs/interfaces/cardManagement/ICard.d.ts +27 -0
- package/dist/cjs/interfaces/cardManagement/cardManagementInterfaces.d.ts +67 -0
- package/dist/cjs/interfaces/common/CurrencyCodeEnum.d.ts +5 -0
- package/dist/cjs/interfaces/common/NotificationChannelEnum.d.ts +6 -0
- package/dist/cjs/interfaces/common/index.d.ts +2 -0
- package/dist/cjs/interfaces/excludes/excludeInterfaces.d.ts +43 -0
- package/dist/cjs/interfaces/excludes/listExcludesInterfaces.d.ts +10 -0
- package/dist/cjs/interfaces/issuer/IGetCardBonuses.d.ts +23 -0
- package/dist/cjs/interfaces/issuer/IGetCardSpends.d.ts +15 -0
- package/dist/cjs/interfaces/issuerInterface.d.ts +195 -0
- package/dist/cjs/interfaces/json.d.ts +5 -0
- package/dist/cjs/interfaces/loggerInterface.d.ts +19 -0
- package/dist/cjs/interfaces/notifications/IGetMyNotificationStats.d.ts +11 -0
- package/dist/cjs/interfaces/order/orderInterfaces.d.ts +101 -0
- package/dist/cjs/interfaces/products/TGetGroupById.d.ts +4 -0
- package/dist/cjs/interfaces/products/TGetProductById.d.ts +4 -0
- package/dist/cjs/interfaces/products/categoryInterfaces.d.ts +11 -0
- package/dist/cjs/interfaces/products/listCategoriesInterfaces.d.ts +13 -0
- package/dist/cjs/interfaces/products/listProductsInterfaces.d.ts +13 -0
- package/dist/cjs/interfaces/products/productInterfaces.d.ts +39 -0
- package/dist/cjs/interfaces/products/productSearchInterfaces.d.ts +4 -0
- package/dist/cjs/interfaces/promoCodes/ICreatePromocodePayload.d.ts +15 -0
- package/dist/cjs/interfaces/promoCodes/IPromocode.d.ts +30 -0
- package/dist/cjs/interfaces/promoCodes/IUpdatePromocodePayload.d.ts +14 -0
- package/dist/cjs/interfaces/promoCodes/promocodeInterfaces.d.ts +27 -0
- package/dist/cjs/interfaces/referralProgram/ICreateRefProgramPayload.d.ts +12 -0
- package/dist/cjs/interfaces/referralProgram/IInfluencerPayload.d.ts +7 -0
- package/dist/cjs/interfaces/referralProgram/IRefProgramInfluencer.d.ts +12 -0
- package/dist/cjs/interfaces/referralProgram/IRefProgramStats.d.ts +19 -0
- package/dist/cjs/interfaces/referralProgram/IReferralProgram.d.ts +51 -0
- package/dist/cjs/interfaces/referralProgram/IUpdateRefProgramPayload.d.ts +9 -0
- package/dist/cjs/interfaces/referralProgram/influencerInterfaces.d.ts +35 -0
- package/dist/cjs/interfaces/referralProgram/referralProgramInterfaces.d.ts +45 -0
- package/dist/cjs/interfaces/requestFilterInterfaces.d.ts +29 -0
- package/dist/cjs/interfaces/shortLinkActionInterface.d.ts +146 -0
- package/dist/cjs/interfaces/shortLinkInterface.d.ts +92 -0
- package/dist/cjs/interfaces/signupInterface.d.ts +56 -0
- package/dist/cjs/interfaces/telemetryInterfaces.d.ts +8 -0
- package/dist/cjs/interfaces/tiers/IGetAllTiers.d.ts +41 -0
- package/dist/cjs/interfaces/tiers/IGetTiersByCard.d.ts +22 -0
- package/dist/cjs/interfaces/tiers/ISetTierByCard.d.ts +16 -0
- package/dist/cjs/interfaces/transactions/IGetTransactionsByCard.d.ts +19 -0
- package/dist/cjs/interfaces/urlInterfaces.d.ts +19 -0
- package/dist/cjs/interfaces/user/IUser.d.ts +20 -0
- package/dist/cjs/interfaces/user/IUserCreate.d.ts +22 -0
- package/dist/cjs/interfaces/user/IUserUpdate.d.ts +7 -0
- package/dist/cjs/interfaces/user/userInterfaces.d.ts +86 -0
- package/dist/cjs/interfaces/user/userNotificationsInterfaces.d.ts +34 -0
- package/dist/cjs/sdk.d.ts +2 -0
- package/dist/cjs/testUtils.d.ts +2 -0
- package/dist/cjs/utils/toFilterQueryParams.d.ts +9 -0
- package/dist/cjs/utils/toIsoString.d.ts +1 -0
- package/dist/cjs/utils/toPagination.d.ts +3 -0
- package/dist/esm5/IContainerRegistry.d.ts +7 -0
- package/dist/esm5/api/analytics/createEvent.d.ts +2 -0
- package/dist/esm5/api/analytics/getActiveUsersData.d.ts +2 -0
- package/dist/esm5/api/analytics/getCardConversionStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getGeneralCardsData.d.ts +2 -0
- package/dist/esm5/api/analytics/getIssuedCardsStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getMyNotificationStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getPointsAddedStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getPointsData.d.ts +2 -0
- package/dist/esm5/api/analytics/getPointsUsedStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getPurchasesStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getUniquePurchasesStats.d.ts +2 -0
- package/dist/esm5/api/analytics/getUserCompositionStats.d.ts +2 -0
- package/dist/esm5/api/analytics/utils.d.ts +1 -0
- package/dist/esm5/api/auth/getJWTByApiKey.d.ts +2 -0
- package/dist/esm5/api/auth/getUserData.d.ts +2 -0
- package/dist/esm5/api/auth/signInByPhone.d.ts +2 -0
- package/dist/esm5/api/auth/validatePhoneOtp.d.ts +2 -0
- package/dist/esm5/api/campaign/createCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/createEmailTemplate.d.ts +16 -0
- package/dist/esm5/api/campaign/createPassPushTemplate.d.ts +15 -0
- package/dist/esm5/api/campaign/createSMSTemplate.d.ts +14 -0
- package/dist/esm5/api/campaign/createWebPushTemplate.d.ts +15 -0
- package/dist/esm5/api/campaign/deleteTemplate.d.ts +2 -0
- package/dist/esm5/api/campaign/deleteTemplateFromCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/getCampaignById.d.ts +2 -0
- package/dist/esm5/api/campaign/getMyCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/getMyCohorts.d.ts +2 -0
- package/dist/esm5/api/campaign/getMyTemplates.d.ts +2 -0
- package/dist/esm5/api/campaign/getTemplateById.d.ts +2 -0
- package/dist/esm5/api/campaign/runCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/setCohortToCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/setTemplateToCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/setTemplatesToCampaign.d.ts +2 -0
- package/dist/esm5/api/campaign/updateEmailTemplate.d.ts +2 -0
- package/dist/esm5/api/campaign/updatePassPushTemplate.d.ts +2 -0
- package/dist/esm5/api/campaign/updateSMSTemplate.d.ts +2 -0
- package/dist/esm5/api/campaign/updateWebPushTemplate.d.ts +2 -0
- package/dist/esm5/api/card/addPoints.d.ts +2 -0
- package/dist/esm5/api/card/addReserve.d.ts +2 -0
- package/dist/esm5/api/card/createAnonymousCard.d.ts +2 -0
- package/dist/esm5/api/card/downloadAndroidCard.d.ts +2 -0
- package/dist/esm5/api/card/downloadAnonymousCard.d.ts +2 -0
- package/dist/esm5/api/card/downloadCardFromPromise.d.ts +4 -0
- package/dist/esm5/api/card/downloadIOSCard.d.ts +2 -0
- package/dist/esm5/api/card/getBalanceHistory.d.ts +3 -0
- package/dist/esm5/api/card/getBonuses.d.ts +2 -0
- package/dist/esm5/api/card/getReferral.d.ts +2 -0
- package/dist/esm5/api/card/getUserCard.d.ts +2 -0
- package/dist/esm5/api/card/restoreCard.d.ts +2 -0
- package/dist/esm5/api/card/setTypeCard.d.ts +2 -0
- package/dist/esm5/api/card/spendPoints.d.ts +2 -0
- package/dist/esm5/api/card/updateCard.d.ts +2 -0
- package/dist/esm5/api/card/updateDiscountPercent.d.ts +2 -0
- package/dist/esm5/api/cardManagement/createCard.d.ts +2 -0
- package/dist/esm5/api/cardManagement/deactivateCard.d.ts +2 -0
- package/dist/esm5/api/cardManagement/issueCard.d.ts +2 -0
- package/dist/esm5/api/cardManagement/listCards.d.ts +2 -0
- package/dist/esm5/api/cardManagement/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/cardManagement/updateCustomParams.d.ts +2 -0
- package/dist/esm5/api/cardManagement/updateExpirationDate.d.ts +2 -0
- package/dist/esm5/api/excludes/createExclude.d.ts +2 -0
- package/dist/esm5/api/excludes/deleteExclude.d.ts +2 -0
- package/dist/esm5/api/excludes/getExclude.d.ts +2 -0
- package/dist/esm5/api/excludes/listExcludes.d.ts +2 -0
- package/dist/esm5/api/excludes/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/excludes/updateExclude.d.ts +2 -0
- package/dist/esm5/api/issuer/authByPassToken.d.ts +2 -0
- package/dist/esm5/api/issuer/authByToken.d.ts +2 -0
- package/dist/esm5/api/issuer/createIssuer.d.ts +2 -0
- package/dist/esm5/api/issuer/dispatchCustomEvent.d.ts +2 -0
- package/dist/esm5/api/issuer/getCardBonuses.d.ts +13 -0
- package/dist/esm5/api/issuer/getCardById.d.ts +2 -0
- package/dist/esm5/api/issuer/getCardByPhone.d.ts +2 -0
- package/dist/esm5/api/issuer/getCardSpends.d.ts +2 -0
- package/dist/esm5/api/issuer/getIssuer.d.ts +2 -0
- package/dist/esm5/api/issuer/refreshApiKey.d.ts +2 -0
- package/dist/esm5/api/issuer/sendNotificationToCards.d.ts +2 -0
- package/dist/esm5/api/issuer/sendPushNotification.d.ts +3 -0
- package/dist/esm5/api/issuer/sendToAllIssuerCards.d.ts +2 -0
- package/dist/esm5/api/issuer/setCardName.d.ts +2 -0
- package/dist/esm5/api/issuer/setSettings.d.ts +2 -0
- package/dist/esm5/api/logger/logDebug.d.ts +2 -0
- package/dist/esm5/api/logger/logError.d.ts +2 -0
- package/dist/esm5/api/logger/logInfo.d.ts +2 -0
- package/dist/esm5/api/logger/setup.d.ts +3 -0
- package/dist/esm5/api/notification/listEmailTemplates.d.ts +2 -0
- package/dist/esm5/api/notification/sendCompanyEmailByEvent.d.ts +2 -0
- package/dist/esm5/api/notification/sendCompanySmsByEvent.d.ts +2 -0
- package/dist/esm5/api/notification/sendEmailByEvent.d.ts +2 -0
- package/dist/esm5/api/notification/subscribeToNotifications.d.ts +2 -0
- package/dist/esm5/api/order/closeOrder.d.ts +2 -0
- package/dist/esm5/api/order/openOrder.d.ts +2 -0
- package/dist/esm5/api/order/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/products/categoryResultSerializer.d.ts +1 -0
- package/dist/esm5/api/products/getCategoryById.d.ts +2 -0
- package/dist/esm5/api/products/getProductById.d.ts +2 -0
- package/dist/esm5/api/products/productResultSerializer.d.ts +1 -0
- package/dist/esm5/api/products/searchCategories.d.ts +2 -0
- package/dist/esm5/api/products/searchProducts.d.ts +2 -0
- package/dist/esm5/api/promocode/archivePromocode.d.ts +2 -0
- package/dist/esm5/api/promocode/createPromocode.d.ts +2 -0
- package/dist/esm5/api/promocode/getPromocodeById.d.ts +2 -0
- package/dist/esm5/api/promocode/listPromocodes.d.ts +2 -0
- package/dist/esm5/api/promocode/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/promocode/unarchivePromocode.d.ts +2 -0
- package/dist/esm5/api/promocode/updatePromocode.d.ts +2 -0
- package/dist/esm5/api/promocode/usePromocode.d.ts +2 -0
- package/dist/esm5/api/referralProgram/archiveRefProgram.d.ts +2 -0
- package/dist/esm5/api/referralProgram/createRefProgram.d.ts +2 -0
- package/dist/esm5/api/referralProgram/getRefProgram.d.ts +2 -0
- package/dist/esm5/api/referralProgram/getRefProgramStats.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/addInfluencer.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/deleteInfluencer.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/getInfluencer.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/getStatsByInfluencer.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/listInfluencers.d.ts +2 -0
- package/dist/esm5/api/referralProgram/influencers/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/referralProgram/influencers/updateInfluencer.d.ts +2 -0
- package/dist/esm5/api/referralProgram/listRefPrograms.d.ts +2 -0
- package/dist/esm5/api/referralProgram/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/referralProgram/unarchiveRefProgram.d.ts +2 -0
- package/dist/esm5/api/referralProgram/updateRefProgram.d.ts +2 -0
- package/dist/esm5/api/shortLink/createLink.d.ts +2 -0
- package/dist/esm5/api/shortLink/deleteLink.d.ts +2 -0
- package/dist/esm5/api/shortLink/editLink.d.ts +2 -0
- package/dist/esm5/api/shortLink/listLinks.d.ts +2 -0
- package/dist/esm5/api/shortLink/resultSerializer.d.ts +1 -0
- package/dist/esm5/api/shortLink/viewLink.d.ts +2 -0
- package/dist/esm5/api/shortLink/wait.d.ts +1 -0
- package/dist/esm5/api/shortLinkAction/createLinkAction.d.ts +2 -0
- package/dist/esm5/api/shortLinkAction/deleteLinkAction.d.ts +2 -0
- package/dist/esm5/api/shortLinkAction/editLinkAction.d.ts +2 -0
- package/dist/esm5/api/signup/acceptTerms.d.ts +2 -0
- package/dist/esm5/api/signup/activateEmail.d.ts +2 -0
- package/dist/esm5/api/signup/activatePhone.d.ts +2 -0
- package/dist/esm5/api/signup/resendActivationCode.d.ts +2 -0
- package/dist/esm5/api/signup/setBirthdate.d.ts +2 -0
- package/dist/esm5/api/signup/setEmail.d.ts +2 -0
- package/dist/esm5/api/signup/setEmailWithoutActivation.d.ts +2 -0
- package/dist/esm5/api/signup/setPhone.d.ts +2 -0
- package/dist/esm5/api/signup/setProfile.d.ts +2 -0
- package/dist/esm5/api/signup/skipEmail.d.ts +2 -0
- package/dist/esm5/api/signup/skipEmailActivation.d.ts +2 -0
- package/dist/esm5/api/signup/skipProfile.d.ts +2 -0
- package/dist/esm5/api/telemetry/send.d.ts +2 -0
- package/dist/esm5/api/tiers/getAllTiers.d.ts +2 -0
- package/dist/esm5/api/tiers/getTiersByCard.d.ts +2 -0
- package/dist/esm5/api/tiers/setTierByCard.d.ts +2 -0
- package/dist/esm5/api/transactions/getTransactionsByCard.d.ts +2 -0
- package/dist/esm5/api/url/getShortLink.d.ts +2 -0
- package/dist/esm5/api/user/changeEmail.d.ts +2 -0
- package/dist/esm5/api/user/changePhone.d.ts +2 -0
- package/dist/esm5/api/user/changeProfileData.d.ts +2 -0
- package/dist/esm5/api/user/createUser.d.ts +2 -0
- package/dist/esm5/api/user/getProfile.d.ts +2 -0
- package/dist/esm5/api/user/updateProfileByIssuer.d.ts +2 -0
- package/dist/esm5/api/user/validateNewPhoneOtp.d.ts +2 -0
- package/dist/esm5/clients/anonymousUserClient.d.ts +2 -0
- package/dist/esm5/clients/anonymousUserClientWithIssuer.d.ts +2 -0
- package/dist/esm5/clients/issuerClient.d.ts +1 -0
- package/dist/esm5/clients/setIssuer.d.ts +3 -0
- package/dist/esm5/clients/setIssuerToken.d.ts +2 -0
- package/dist/esm5/clients/setUserToken.d.ts +2 -0
- package/dist/esm5/clients/timeout.d.ts +1 -0
- package/dist/esm5/clients/url.d.ts +1 -0
- package/dist/esm5/clients/userClient.d.ts +1 -0
- package/dist/esm5/diContainer/container.d.ts +7 -0
- package/dist/esm5/diContainer/initializeDependencies.d.ts +1 -0
- package/dist/esm5/index.d.ts +59 -0
- package/dist/esm5/index.js +1 -0
- package/dist/esm5/interfaces/IRequestWithCancel.d.ts +4 -0
- package/dist/esm5/interfaces/IRequestWithCancelAndData.d.ts +5 -0
- package/dist/esm5/interfaces/ISDK.d.ts +232 -0
- package/dist/esm5/interfaces/I_Deserialized_Response_DTO.d.ts +5 -0
- package/dist/esm5/interfaces/I_JSON_API_ResponseDTO.d.ts +14 -0
- package/dist/esm5/interfaces/JsonApiRequestDTO.d.ts +5 -0
- package/dist/esm5/interfaces/analyticsInterfaces.d.ts +86 -0
- package/dist/esm5/interfaces/authInterfaces.d.ts +39 -0
- package/dist/esm5/interfaces/campaigns/campaignInterfaces.d.ts +174 -0
- package/dist/esm5/interfaces/campaigns/common.d.ts +74 -0
- package/dist/esm5/interfaces/campaigns/getByID.d.ts +9 -0
- package/dist/esm5/interfaces/campaigns/getMyCampaigns.d.ts +8 -0
- package/dist/esm5/interfaces/campaigns/index.d.ts +4 -0
- package/dist/esm5/interfaces/card/IGetBonuses.d.ts +7 -0
- package/dist/esm5/interfaces/cardInterfaces.d.ts +128 -0
- package/dist/esm5/interfaces/cardManagement/ICard.d.ts +27 -0
- package/dist/esm5/interfaces/cardManagement/cardManagementInterfaces.d.ts +67 -0
- package/dist/esm5/interfaces/common/CurrencyCodeEnum.d.ts +5 -0
- package/dist/esm5/interfaces/common/NotificationChannelEnum.d.ts +6 -0
- package/dist/esm5/interfaces/common/index.d.ts +2 -0
- package/dist/esm5/interfaces/excludes/excludeInterfaces.d.ts +43 -0
- package/dist/esm5/interfaces/excludes/listExcludesInterfaces.d.ts +10 -0
- package/dist/esm5/interfaces/issuer/IGetCardBonuses.d.ts +23 -0
- package/dist/esm5/interfaces/issuer/IGetCardSpends.d.ts +15 -0
- package/dist/esm5/interfaces/issuerInterface.d.ts +195 -0
- package/dist/esm5/interfaces/json.d.ts +5 -0
- package/dist/esm5/interfaces/loggerInterface.d.ts +19 -0
- package/dist/esm5/interfaces/notifications/IGetMyNotificationStats.d.ts +11 -0
- package/dist/esm5/interfaces/order/orderInterfaces.d.ts +101 -0
- package/dist/esm5/interfaces/products/TGetGroupById.d.ts +4 -0
- package/dist/esm5/interfaces/products/TGetProductById.d.ts +4 -0
- package/dist/esm5/interfaces/products/categoryInterfaces.d.ts +11 -0
- package/dist/esm5/interfaces/products/listCategoriesInterfaces.d.ts +13 -0
- package/dist/esm5/interfaces/products/listProductsInterfaces.d.ts +13 -0
- package/dist/esm5/interfaces/products/productInterfaces.d.ts +39 -0
- package/dist/esm5/interfaces/products/productSearchInterfaces.d.ts +4 -0
- package/dist/esm5/interfaces/promoCodes/ICreatePromocodePayload.d.ts +15 -0
- package/dist/esm5/interfaces/promoCodes/IPromocode.d.ts +30 -0
- package/dist/esm5/interfaces/promoCodes/IUpdatePromocodePayload.d.ts +14 -0
- package/dist/esm5/interfaces/promoCodes/promocodeInterfaces.d.ts +27 -0
- package/dist/esm5/interfaces/referralProgram/ICreateRefProgramPayload.d.ts +12 -0
- package/dist/esm5/interfaces/referralProgram/IInfluencerPayload.d.ts +7 -0
- package/dist/esm5/interfaces/referralProgram/IRefProgramInfluencer.d.ts +12 -0
- package/dist/esm5/interfaces/referralProgram/IRefProgramStats.d.ts +19 -0
- package/dist/esm5/interfaces/referralProgram/IReferralProgram.d.ts +51 -0
- package/dist/esm5/interfaces/referralProgram/IUpdateRefProgramPayload.d.ts +9 -0
- package/dist/esm5/interfaces/referralProgram/influencerInterfaces.d.ts +35 -0
- package/dist/esm5/interfaces/referralProgram/referralProgramInterfaces.d.ts +45 -0
- package/dist/esm5/interfaces/requestFilterInterfaces.d.ts +29 -0
- package/dist/esm5/interfaces/shortLinkActionInterface.d.ts +146 -0
- package/dist/esm5/interfaces/shortLinkInterface.d.ts +92 -0
- package/dist/esm5/interfaces/signupInterface.d.ts +56 -0
- package/dist/esm5/interfaces/telemetryInterfaces.d.ts +8 -0
- package/dist/esm5/interfaces/tiers/IGetAllTiers.d.ts +41 -0
- package/dist/esm5/interfaces/tiers/IGetTiersByCard.d.ts +22 -0
- package/dist/esm5/interfaces/tiers/ISetTierByCard.d.ts +16 -0
- package/dist/esm5/interfaces/transactions/IGetTransactionsByCard.d.ts +19 -0
- package/dist/esm5/interfaces/urlInterfaces.d.ts +19 -0
- package/dist/esm5/interfaces/user/IUser.d.ts +20 -0
- package/dist/esm5/interfaces/user/IUserCreate.d.ts +22 -0
- package/dist/esm5/interfaces/user/IUserUpdate.d.ts +7 -0
- package/dist/esm5/interfaces/user/userInterfaces.d.ts +86 -0
- package/dist/esm5/interfaces/user/userNotificationsInterfaces.d.ts +34 -0
- package/dist/esm5/sdk.d.ts +2 -0
- package/dist/esm5/testUtils.d.ts +2 -0
- package/dist/esm5/utils/toFilterQueryParams.d.ts +9 -0
- package/dist/esm5/utils/toIsoString.d.ts +1 -0
- package/dist/esm5/utils/toPagination.d.ts +3 -0
- package/package.json +60 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import type { ICreateEvent, IGetActiveUsersData, IGetCardConversionStats, IGetGeneralCardsData, IGetIssuedCardsStats, IGetPointsAddedStats, IGetPointsData, IGetPointsUsedStats, IGetPurchasesStats, IGetUniquePurchasesStats, IGetUserCompositionStats } from './analyticsInterfaces';
|
|
2
|
+
import type { IGetMyNotificationStats } from './notifications/IGetMyNotificationStats';
|
|
3
|
+
import type { IGetUserTokenByIssuerAPIKey, IGetUserData, ISignInByPhone, IValidatePhoneOtp } from './authInterfaces';
|
|
4
|
+
import type { IAddPoints, IAddReserve, ICreateAnonymousUserCard, IGetAndroidCardDownloadLink, IDownloadIOSCard, IGetBalanceHistory, IGetCardBalanceHistory, IGetReferral, IGetUserCard, IRestoreCard, ISetTypeCard, ISpendPoints, IUpdateCard, IUpdateDiscountPercent } from './cardInterfaces';
|
|
5
|
+
import type { IAuthByPassToken, IAuthByToken, ICreateIssuer, IGetIssuer, IRefreshApiKey, ISendNotificationToCards, ISendPushNotification, ISendToAllIssuerCards, ISetSettings, ISetIssuerToken, IGetCardById } from './issuerInterface';
|
|
6
|
+
import type { ILogFn } from './loggerInterface';
|
|
7
|
+
import type { ICreateLink, IDeleteLink, IEditLink, IListLinks, IViewLink } from './shortLinkInterface';
|
|
8
|
+
import type { IAcceptTerms, IActivateEmail, IActivatePhone, IResendActivationCode, ISetEmail, ISetPhone, ISetProfile, ISkipEmail, ISkipEmailActivation, ISkipProfile } from './signupInterface';
|
|
9
|
+
import type { IGetShortUrl } from './urlInterfaces';
|
|
10
|
+
import type { ISetUserToken, ISetIssuer, IChangeEmail, IChangePhone, IChangeProfileData, IGetProfile, IValidateNewPhoneOtp, IUpdateProfileByIssuer, ICreateUser } from './user/userInterfaces';
|
|
11
|
+
import type { ISubscribeToWebPushNotifications, ISendEmailByEvent, ISendCompanyEmailByEvent, IListEmailTemplates, ISendCompanySmsByEvent } from './user/userNotificationsInterfaces';
|
|
12
|
+
import { ILoggerSetup } from './loggerInterface';
|
|
13
|
+
import { IDownloadAnonymousCard } from './cardInterfaces';
|
|
14
|
+
import { ISendTelemetry } from './telemetryInterfaces';
|
|
15
|
+
import { ICreateCampaign, ISetCohortToCampaign, ISetTemplateToCampaign, ISetTemplatesToCampaign, IDeleteTemplateFromCampaign, IRunCampaign, IGetMyCohorts, IGetMyTemplates, IGetTemplateById, IDeleteTemplate, ICreateEmailTemplate, ICreateSMSTemplate, ICreateWebPushTemplate, ICreatePassPushTemplate, IUpdateEmailTemplate, IUpdateSMSTemplate, IUpdatePassPushTemplate, IUpdateWebPushTemplate, IGetCampaignById, IGetMyCampaign } from './campaigns';
|
|
16
|
+
import { IDispatchCustomEvent, IGetCardByPhone, ISetCardName } from './issuerInterface';
|
|
17
|
+
import { ISetBirthdate } from './signupInterface';
|
|
18
|
+
import { IGetTransactionsByCard } from './transactions/IGetTransactionsByCard';
|
|
19
|
+
import { IGetCardBonuses } from './issuer/IGetCardBonuses';
|
|
20
|
+
import { IGetBonuses } from './card/IGetBonuses';
|
|
21
|
+
import { IGetAllTiers } from './tiers/IGetAllTiers';
|
|
22
|
+
import { ISetTierByCard } from './tiers/ISetTierByCard';
|
|
23
|
+
import { IGetTiersByCard } from './tiers/IGetTiersByCard';
|
|
24
|
+
import { IGetCardSpends } from './issuer/IGetCardSpends';
|
|
25
|
+
import { ICreateLinkAction, IDeleteLinkAction, IEditLinkAction } from './shortLinkActionInterface';
|
|
26
|
+
import { TArchivePromocode, TCreatePromocode, TGetPromocodeById, TListPromocodes, TUnarchivePromocode, TUpdatePromocode, TUsePromocode } from './promoCodes/promocodeInterfaces';
|
|
27
|
+
import { TListExcludes } from './excludes/listExcludesInterfaces';
|
|
28
|
+
import { TCreateExclude, TDeleteExclude, TGetExclude, TUpdateExclude } from './excludes/excludeInterfaces';
|
|
29
|
+
import { TListProducts } from './products/listProductsInterfaces';
|
|
30
|
+
import { TListCategories } from './products/listCategoriesInterfaces';
|
|
31
|
+
import { TGetProductById } from './products/TGetProductById';
|
|
32
|
+
import { TGetCategoryById } from './products/TGetGroupById';
|
|
33
|
+
import { ICreateCard, IIssueCard, IListCards, IDeactivateCard, IUpdateCardCustomParams, IUpdateCardExpirationDate } from './cardManagement/cardManagementInterfaces';
|
|
34
|
+
import { TCloseOrder, TOpenOrder } from './order/orderInterfaces';
|
|
35
|
+
import { ICreateReferralProgram, IUpdateReferralProgram, IArchiveReferralProgram, IUnarchiveReferralProgram, IGetReferralProgram, IGetRefProgramStats, IListReferralPrograms } from './referralProgram/referralProgramInterfaces';
|
|
36
|
+
import { IAddInfluencer, IUpdateInfluencer, IDeleteInfluencer, IGetInfluencer, IGetStatsByInfluencer, IListInfluencers } from './referralProgram/influencerInterfaces';
|
|
37
|
+
export interface ISDK {
|
|
38
|
+
init(envUrl?: string): void;
|
|
39
|
+
user: {
|
|
40
|
+
setUserToken: ISetUserToken;
|
|
41
|
+
setIssuer: ISetIssuer;
|
|
42
|
+
createUser: ICreateUser;
|
|
43
|
+
changeEmail: IChangeEmail;
|
|
44
|
+
changePhone: IChangePhone;
|
|
45
|
+
changeProfileData: IChangeProfileData;
|
|
46
|
+
updateProfileByIssuer: IUpdateProfileByIssuer;
|
|
47
|
+
getProfile: IGetProfile;
|
|
48
|
+
validateNewPhoneOtp: IValidateNewPhoneOtp;
|
|
49
|
+
notification: {
|
|
50
|
+
subscribeToWebPushNotifications: ISubscribeToWebPushNotifications;
|
|
51
|
+
sendEmailByEvent: ISendEmailByEvent;
|
|
52
|
+
sendCompanyEmailByEvent: ISendCompanyEmailByEvent;
|
|
53
|
+
sendCompanySmsByEvent: ISendCompanySmsByEvent;
|
|
54
|
+
listEmailTemplates: IListEmailTemplates;
|
|
55
|
+
};
|
|
56
|
+
card: {
|
|
57
|
+
downloadIOSCard: IDownloadIOSCard;
|
|
58
|
+
getAndroidCardDownloadLink: IGetAndroidCardDownloadLink;
|
|
59
|
+
createAnonymousUserCard: ICreateAnonymousUserCard;
|
|
60
|
+
getBalanceHistory: IGetBalanceHistory;
|
|
61
|
+
getCardBalanceHistory: IGetCardBalanceHistory;
|
|
62
|
+
getReferral: IGetReferral;
|
|
63
|
+
getUserCard: IGetUserCard;
|
|
64
|
+
restoreCard: IRestoreCard;
|
|
65
|
+
updateCard: IUpdateCard;
|
|
66
|
+
addPoints: IAddPoints;
|
|
67
|
+
addReserve: IAddReserve;
|
|
68
|
+
setTypeCard: ISetTypeCard;
|
|
69
|
+
spendPoints: ISpendPoints;
|
|
70
|
+
updateDiscountPercent: IUpdateDiscountPercent;
|
|
71
|
+
downloadAnonymousCard: IDownloadAnonymousCard;
|
|
72
|
+
getBonuses: IGetBonuses;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
cardManagement: {
|
|
76
|
+
listCards: IListCards;
|
|
77
|
+
createCard: ICreateCard;
|
|
78
|
+
updateCustomParams: IUpdateCardCustomParams;
|
|
79
|
+
updateExpirationDate: IUpdateCardExpirationDate;
|
|
80
|
+
issueCard: IIssueCard;
|
|
81
|
+
deactivateCard: IDeactivateCard;
|
|
82
|
+
};
|
|
83
|
+
auth: {
|
|
84
|
+
getUserTokenByIssuerAPIKey: IGetUserTokenByIssuerAPIKey;
|
|
85
|
+
getUserData: IGetUserData;
|
|
86
|
+
signInByPhone: ISignInByPhone;
|
|
87
|
+
validatePhoneOtp: IValidatePhoneOtp;
|
|
88
|
+
};
|
|
89
|
+
issuer: {
|
|
90
|
+
setIssuerToken: ISetIssuerToken;
|
|
91
|
+
/** @deprecated */
|
|
92
|
+
sendPushNotification: ISendPushNotification;
|
|
93
|
+
authByPassToken: IAuthByPassToken;
|
|
94
|
+
authByToken: IAuthByToken;
|
|
95
|
+
createIssuer: ICreateIssuer;
|
|
96
|
+
getIssuer: IGetIssuer;
|
|
97
|
+
refreshApiKey: IRefreshApiKey;
|
|
98
|
+
setSettings: ISetSettings;
|
|
99
|
+
sendNotificationToCards: ISendNotificationToCards;
|
|
100
|
+
sendToAllIssuerCards: ISendToAllIssuerCards;
|
|
101
|
+
dispatchCustomEvent: IDispatchCustomEvent;
|
|
102
|
+
getCardById: IGetCardById;
|
|
103
|
+
getCardByPhone: IGetCardByPhone;
|
|
104
|
+
getCardBalanceHistory: IGetCardBalanceHistory;
|
|
105
|
+
setCardName: ISetCardName;
|
|
106
|
+
getCardBonuses: IGetCardBonuses;
|
|
107
|
+
getCardSpends: IGetCardSpends;
|
|
108
|
+
};
|
|
109
|
+
logger: {
|
|
110
|
+
logError: ILogFn;
|
|
111
|
+
logDebug: ILogFn;
|
|
112
|
+
logInfo: ILogFn;
|
|
113
|
+
setup: ILoggerSetup;
|
|
114
|
+
};
|
|
115
|
+
signup: {
|
|
116
|
+
acceptTerms: IAcceptTerms;
|
|
117
|
+
activateEmail: IActivateEmail;
|
|
118
|
+
activatePhone: IActivatePhone;
|
|
119
|
+
resendActivationCode: IResendActivationCode;
|
|
120
|
+
setEmail: ISetEmail;
|
|
121
|
+
setEmailWithoutActivation: ISetEmail;
|
|
122
|
+
setPhone: ISetPhone;
|
|
123
|
+
setBirthdate: ISetBirthdate;
|
|
124
|
+
setProfile: ISetProfile;
|
|
125
|
+
skipEmail: ISkipEmail;
|
|
126
|
+
skipEmailActivation: ISkipEmailActivation;
|
|
127
|
+
skipProfile: ISkipProfile;
|
|
128
|
+
};
|
|
129
|
+
url: {
|
|
130
|
+
getShortUrl: IGetShortUrl;
|
|
131
|
+
};
|
|
132
|
+
analytics: {
|
|
133
|
+
createEvent: ICreateEvent;
|
|
134
|
+
getGeneralCardsData: IGetGeneralCardsData;
|
|
135
|
+
getActiveUsersData: IGetActiveUsersData;
|
|
136
|
+
getPointsData: IGetPointsData;
|
|
137
|
+
getPointsAddedStats: IGetPointsAddedStats;
|
|
138
|
+
getPointsUsedStats: IGetPointsUsedStats;
|
|
139
|
+
getMyNotificationStats: IGetMyNotificationStats;
|
|
140
|
+
getIssuedCardsStats: IGetIssuedCardsStats;
|
|
141
|
+
getPurchasesStats: IGetPurchasesStats;
|
|
142
|
+
getUniquePurchasesStats: IGetUniquePurchasesStats;
|
|
143
|
+
getUserCompositionStats: IGetUserCompositionStats;
|
|
144
|
+
getCardConversionStats: IGetCardConversionStats;
|
|
145
|
+
};
|
|
146
|
+
shortLink: {
|
|
147
|
+
createLink: ICreateLink;
|
|
148
|
+
viewLink: IViewLink;
|
|
149
|
+
deleteLink: IDeleteLink;
|
|
150
|
+
editLink: IEditLink;
|
|
151
|
+
listLinks: IListLinks;
|
|
152
|
+
};
|
|
153
|
+
shortLinkAction: {
|
|
154
|
+
createLinkAction: ICreateLinkAction;
|
|
155
|
+
editLinkAction: IEditLinkAction;
|
|
156
|
+
deleteLinkAction: IDeleteLinkAction;
|
|
157
|
+
};
|
|
158
|
+
telemetry: {
|
|
159
|
+
send: ISendTelemetry;
|
|
160
|
+
};
|
|
161
|
+
campaign: {
|
|
162
|
+
createCampaign: ICreateCampaign;
|
|
163
|
+
setCohortToCampaign: ISetCohortToCampaign;
|
|
164
|
+
setTemplateToCampaign: ISetTemplateToCampaign;
|
|
165
|
+
setTemplatesToCampaign: ISetTemplatesToCampaign;
|
|
166
|
+
deleteTemplateFromCampaign: IDeleteTemplateFromCampaign;
|
|
167
|
+
runCampaign: IRunCampaign;
|
|
168
|
+
getMyCampaign: IGetMyCampaign;
|
|
169
|
+
getCampaignById: IGetCampaignById;
|
|
170
|
+
getMyCohorts: IGetMyCohorts;
|
|
171
|
+
createEmailTemplate: ICreateEmailTemplate;
|
|
172
|
+
createSMSTemplate: ICreateSMSTemplate;
|
|
173
|
+
createPassPushTemplate: ICreatePassPushTemplate;
|
|
174
|
+
createWebPushTemplate: ICreateWebPushTemplate;
|
|
175
|
+
getMyTemplates: IGetMyTemplates;
|
|
176
|
+
getTemplateById: IGetTemplateById;
|
|
177
|
+
updateEmailTemplate: IUpdateEmailTemplate;
|
|
178
|
+
updateSMSTemplate: IUpdateSMSTemplate;
|
|
179
|
+
updatePassPushTemplate: IUpdatePassPushTemplate;
|
|
180
|
+
updateWebPushTemplate: IUpdateWebPushTemplate;
|
|
181
|
+
deleteTemplate: IDeleteTemplate;
|
|
182
|
+
};
|
|
183
|
+
transactions: {
|
|
184
|
+
getTransactionsByCard: IGetTransactionsByCard;
|
|
185
|
+
};
|
|
186
|
+
tiers: {
|
|
187
|
+
getAllTiers: IGetAllTiers;
|
|
188
|
+
getTiersByCard: IGetTiersByCard;
|
|
189
|
+
setTierByCard: ISetTierByCard;
|
|
190
|
+
};
|
|
191
|
+
promocodes: {
|
|
192
|
+
listPromocodes: TListPromocodes;
|
|
193
|
+
getPromocodeById: TGetPromocodeById;
|
|
194
|
+
createPromocode: TCreatePromocode;
|
|
195
|
+
updatePromocode: TUpdatePromocode;
|
|
196
|
+
archivePromocode: TArchivePromocode;
|
|
197
|
+
unarchivePromocode: TUnarchivePromocode;
|
|
198
|
+
usePromocode: TUsePromocode;
|
|
199
|
+
};
|
|
200
|
+
excludes: {
|
|
201
|
+
listExcludes: TListExcludes;
|
|
202
|
+
getExclude: TGetExclude;
|
|
203
|
+
createExclude: TCreateExclude;
|
|
204
|
+
updateExclude: TUpdateExclude;
|
|
205
|
+
deleteExclude: TDeleteExclude;
|
|
206
|
+
};
|
|
207
|
+
products: {
|
|
208
|
+
searchProducts: TListProducts;
|
|
209
|
+
searchCategories: TListCategories;
|
|
210
|
+
getProductById: TGetProductById;
|
|
211
|
+
getCategoryById: TGetCategoryById;
|
|
212
|
+
};
|
|
213
|
+
orders: {
|
|
214
|
+
openOrder: TOpenOrder;
|
|
215
|
+
closeOrder: TCloseOrder;
|
|
216
|
+
};
|
|
217
|
+
referralProgram: {
|
|
218
|
+
createRefProgram: ICreateReferralProgram;
|
|
219
|
+
updateRefProgram: IUpdateReferralProgram;
|
|
220
|
+
archiveRefProgram: IArchiveReferralProgram;
|
|
221
|
+
unarchiveRefProgram: IUnarchiveReferralProgram;
|
|
222
|
+
listRefPrograms: IListReferralPrograms;
|
|
223
|
+
getRefProgram: IGetReferralProgram;
|
|
224
|
+
getRefProgramStats: IGetRefProgramStats;
|
|
225
|
+
addInfluencer: IAddInfluencer;
|
|
226
|
+
updateInfluencer: IUpdateInfluencer;
|
|
227
|
+
deleteInfluencer: IDeleteInfluencer;
|
|
228
|
+
listInfluencers: IListInfluencers;
|
|
229
|
+
getInfluencer: IGetInfluencer;
|
|
230
|
+
getStatsByInfluencer: IGetStatsByInfluencer;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IPaginationMeta, IPaginationExternalMeta } from "./requestFilterInterfaces";
|
|
2
|
+
export interface I_JSON_API_Response_Single<R = unknown, I = unknown> {
|
|
3
|
+
data: {
|
|
4
|
+
attributes: R;
|
|
5
|
+
};
|
|
6
|
+
included: I[];
|
|
7
|
+
}
|
|
8
|
+
export interface I_JSON_API_Response_Many<R = unknown, I = unknown> {
|
|
9
|
+
data: {
|
|
10
|
+
attributes: R;
|
|
11
|
+
}[];
|
|
12
|
+
included: I[];
|
|
13
|
+
meta?: IPaginationMeta | IPaginationExternalMeta;
|
|
14
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { IHTTPClientResponse } from '@roketus/web-toolkit';
|
|
2
|
+
import { I_JSON_API_Response_Many } from './I_JSON_API_ResponseDTO';
|
|
3
|
+
export interface ICreateEvent {
|
|
4
|
+
(action: string, section: string, userId: string, OSType?: string, OSVersion?: string): void;
|
|
5
|
+
}
|
|
6
|
+
export interface IGetActiveUsersData {
|
|
7
|
+
(startDate: Date, endDate: Date): Promise<ActiveUsersDataResponseDTO>;
|
|
8
|
+
}
|
|
9
|
+
export interface IGetGeneralCardsData {
|
|
10
|
+
(startDate: Date, endDate: Date): Promise<GeneralCardsDataResponseDTO>;
|
|
11
|
+
}
|
|
12
|
+
export interface IGetPointsData {
|
|
13
|
+
(startDate: Date, endDate: Date): Promise<IPointsAttributes>;
|
|
14
|
+
}
|
|
15
|
+
export interface IGetPointsAddedStats {
|
|
16
|
+
(startDate: Date, endDate: Date): Promise<IAnalyticsAttributes>;
|
|
17
|
+
}
|
|
18
|
+
export interface IGetPointsUsedStats {
|
|
19
|
+
(startDate: Date, endDate: Date): Promise<IAnalyticsAttributes>;
|
|
20
|
+
}
|
|
21
|
+
export interface IGetIssuedCardsStats {
|
|
22
|
+
(startDate: Date, endDate: Date): Promise<IAnalyticsAttributes>;
|
|
23
|
+
}
|
|
24
|
+
export interface IGetPurchasesStats {
|
|
25
|
+
(startDate: Date, endDate: Date): Promise<IAnalyticsAttributes>;
|
|
26
|
+
}
|
|
27
|
+
export interface IGetUniquePurchasesStats {
|
|
28
|
+
(startDate: Date, endDate: Date): Promise<IAnalyticsAttributes>;
|
|
29
|
+
}
|
|
30
|
+
export interface IGetCardConversionStats {
|
|
31
|
+
(startDate: Date, endDate: Date): Promise<ICardConversionAttributes>;
|
|
32
|
+
}
|
|
33
|
+
export interface IGetUserCompositionStats {
|
|
34
|
+
(startDate: Date, endDate: Date): Promise<IUserCompositionAttributes>;
|
|
35
|
+
}
|
|
36
|
+
declare type ActiveUsersDataResponseDTO = IHTTPClientResponse<IGetActiveUsersDataResponse>;
|
|
37
|
+
interface IGetActiveUsersDataResponse {
|
|
38
|
+
data: [
|
|
39
|
+
{
|
|
40
|
+
attributes: {
|
|
41
|
+
dau: Record<string, number>;
|
|
42
|
+
mau: Record<string, number>;
|
|
43
|
+
wau: Record<string, number>;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
declare type GeneralCardsDataResponseDTO = IHTTPClientResponse<IGetGeneralCardsDataResponse>;
|
|
49
|
+
interface IGetGeneralCardsDataResponse {
|
|
50
|
+
data: [
|
|
51
|
+
{
|
|
52
|
+
attributes: {
|
|
53
|
+
cardInstalled: number;
|
|
54
|
+
cardIssued: number;
|
|
55
|
+
cardRemoved: number;
|
|
56
|
+
cardScanned: number;
|
|
57
|
+
pointsReceived: number;
|
|
58
|
+
pointsUsed: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
export declare type PointsDataResponseDTO = I_JSON_API_Response_Many<IPointsAttributes>;
|
|
64
|
+
export interface IPointsAttributes {
|
|
65
|
+
received: Record<string, number>;
|
|
66
|
+
used: Record<string, number>;
|
|
67
|
+
}
|
|
68
|
+
export declare type IAnalyticResponseDTO = I_JSON_API_Response_Many<IAnalyticsAttributes>;
|
|
69
|
+
export interface IAnalyticsAttributes {
|
|
70
|
+
daily_stats: Record<string, number>;
|
|
71
|
+
}
|
|
72
|
+
export declare type IUserCompositionResponseDTO = I_JSON_API_Response_Many<IUserCompositionAttributes>;
|
|
73
|
+
export interface IUserCompositionAttributes {
|
|
74
|
+
os_distribution: Record<string, number>;
|
|
75
|
+
}
|
|
76
|
+
export declare type ICardConversionResponseDto = I_JSON_API_Response_Many<ICardConversionAttributes>;
|
|
77
|
+
export interface ICardConversionAttributes {
|
|
78
|
+
action_stats: {
|
|
79
|
+
CardCreated?: number;
|
|
80
|
+
CardDownloaded?: number;
|
|
81
|
+
CardInstalled?: number;
|
|
82
|
+
CardRemoved?: number;
|
|
83
|
+
CardUpdated?: number;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IHTTPClientResponse } from '@roketus/web-toolkit';
|
|
2
|
+
import { ActivationResponseDTO } from './signupInterface';
|
|
3
|
+
export interface IGetUserTokenByIssuerAPIKey {
|
|
4
|
+
(apiKey: string): Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
export interface IGetUserData {
|
|
7
|
+
(): Promise<getUserDataResponseDTO>;
|
|
8
|
+
}
|
|
9
|
+
export interface ISignInByPhone {
|
|
10
|
+
(phoneNumber: string): Promise<CreateAnonymousCardResponseDTO>;
|
|
11
|
+
}
|
|
12
|
+
export interface IValidatePhoneOtp {
|
|
13
|
+
(phoneNumber: string, code: number): Promise<IHTTPClientResponse<ActivationResponseDTO>>;
|
|
14
|
+
}
|
|
15
|
+
interface getUserDataResponseDTO {
|
|
16
|
+
createdAt: string;
|
|
17
|
+
email: string;
|
|
18
|
+
emailVerified: boolean;
|
|
19
|
+
phone: string;
|
|
20
|
+
phoneVerified: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface CreateAnonymousCardResponseDTO {
|
|
23
|
+
data: [
|
|
24
|
+
{
|
|
25
|
+
id: string;
|
|
26
|
+
type: 'card';
|
|
27
|
+
attributes: {
|
|
28
|
+
android_card_file_link: string;
|
|
29
|
+
card_number: string;
|
|
30
|
+
created_at: number;
|
|
31
|
+
ios_card_file_link: string;
|
|
32
|
+
issuer: string;
|
|
33
|
+
};
|
|
34
|
+
relationships: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
included: [];
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { IHTTPClientResponse } from '@roketus/web-toolkit';
|
|
2
|
+
import { ICampaignEmailAttributes, ICampaignJSONAPIDTO, ICampaignPassPushAttributes, ICampaignSMSAttributes, ICampaignWebPushAttributes } from './common';
|
|
3
|
+
export interface ICreateCampaign {
|
|
4
|
+
({ name }: {
|
|
5
|
+
name: string;
|
|
6
|
+
}): Promise<IHTTPClientResponse<CreateCampaignResponseDTO>>;
|
|
7
|
+
}
|
|
8
|
+
export interface ISetCohortToCampaign {
|
|
9
|
+
({ campaignId, cohortId }: {
|
|
10
|
+
campaignId: string;
|
|
11
|
+
cohortId: string;
|
|
12
|
+
}): Promise<IHTTPClientResponse<SetCohortToCampaignResponseDTO>>;
|
|
13
|
+
}
|
|
14
|
+
export interface ISetTemplateToCampaign {
|
|
15
|
+
({ campaignId, templateId }: {
|
|
16
|
+
campaignId: string;
|
|
17
|
+
templateId: string;
|
|
18
|
+
}): Promise<IHTTPClientResponse<SetTemplateToCampaignResponseDTO>>;
|
|
19
|
+
}
|
|
20
|
+
export interface ISetTemplatesToCampaign {
|
|
21
|
+
({ campaignId, templateIds }: {
|
|
22
|
+
campaignId: string;
|
|
23
|
+
templateIds: string[];
|
|
24
|
+
}): Promise<IHTTPClientResponse<SetTemplateToCampaignResponseDTO>>;
|
|
25
|
+
}
|
|
26
|
+
export interface IDeleteTemplateFromCampaign {
|
|
27
|
+
({ campaignId, templateId }: {
|
|
28
|
+
campaignId: string;
|
|
29
|
+
templateId: string;
|
|
30
|
+
}): Promise<IHTTPClientResponse<DeleteTemplateFromCampaignResponseDTO>>;
|
|
31
|
+
}
|
|
32
|
+
export interface IRunCampaign {
|
|
33
|
+
({ campaignId }: {
|
|
34
|
+
campaignId: string;
|
|
35
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
36
|
+
}
|
|
37
|
+
export interface IGetMyCohorts {
|
|
38
|
+
(): Promise<IHTTPClientResponse<GetMyCohortsResponseDTO>>;
|
|
39
|
+
}
|
|
40
|
+
export interface ICreateSMSTemplate {
|
|
41
|
+
(payload: {
|
|
42
|
+
name: string;
|
|
43
|
+
message: string;
|
|
44
|
+
}): Promise<IHTTPClientResponse<CreateTemplateResponseDTO>>;
|
|
45
|
+
}
|
|
46
|
+
export interface ICreateWebPushTemplate {
|
|
47
|
+
(payload: {
|
|
48
|
+
name: string;
|
|
49
|
+
title: string;
|
|
50
|
+
message: string;
|
|
51
|
+
}): Promise<IHTTPClientResponse<CreateTemplateResponseDTO>>;
|
|
52
|
+
}
|
|
53
|
+
export interface ICreatePassPushTemplate {
|
|
54
|
+
(payload: {
|
|
55
|
+
name: string;
|
|
56
|
+
title: string;
|
|
57
|
+
message: string;
|
|
58
|
+
}): Promise<IHTTPClientResponse<CreateTemplateResponseDTO>>;
|
|
59
|
+
}
|
|
60
|
+
export interface ICreateEmailTemplate {
|
|
61
|
+
(payload: {
|
|
62
|
+
name: string;
|
|
63
|
+
text: string;
|
|
64
|
+
subject: string;
|
|
65
|
+
body: string;
|
|
66
|
+
}): Promise<IHTTPClientResponse<CreateTemplateResponseDTO>>;
|
|
67
|
+
}
|
|
68
|
+
export interface IGetMyTemplates {
|
|
69
|
+
(): Promise<IHTTPClientResponse<GetMyTemplatesResponseDTO>>;
|
|
70
|
+
}
|
|
71
|
+
export interface IGetTemplateById {
|
|
72
|
+
({ templateId }: {
|
|
73
|
+
templateId: string;
|
|
74
|
+
}): Promise<IHTTPClientResponse<GetTemplateByIdResponseDTO>>;
|
|
75
|
+
}
|
|
76
|
+
export interface IUpdateEmailTemplate {
|
|
77
|
+
(payload: {
|
|
78
|
+
templateId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
subject: string;
|
|
81
|
+
body: string;
|
|
82
|
+
text: string;
|
|
83
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
84
|
+
}
|
|
85
|
+
export interface IUpdateSMSTemplate {
|
|
86
|
+
(payload: {
|
|
87
|
+
templateId: string;
|
|
88
|
+
name: string;
|
|
89
|
+
message: string;
|
|
90
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
91
|
+
}
|
|
92
|
+
export interface IUpdateWebPushTemplate {
|
|
93
|
+
(payload: {
|
|
94
|
+
templateId: string;
|
|
95
|
+
name: string;
|
|
96
|
+
message: string;
|
|
97
|
+
title: string;
|
|
98
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
99
|
+
}
|
|
100
|
+
export interface IUpdatePassPushTemplate {
|
|
101
|
+
(payload: {
|
|
102
|
+
templateId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
message: string;
|
|
105
|
+
title: string;
|
|
106
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
107
|
+
}
|
|
108
|
+
export interface IDeleteTemplate {
|
|
109
|
+
({ templateId }: {
|
|
110
|
+
templateId: string;
|
|
111
|
+
}): Promise<IHTTPClientResponse<void>>;
|
|
112
|
+
}
|
|
113
|
+
export interface ICampaignCohortDTO {
|
|
114
|
+
id: string;
|
|
115
|
+
type: 'cohort';
|
|
116
|
+
attributes: {
|
|
117
|
+
count_of_users: number;
|
|
118
|
+
external_id: string;
|
|
119
|
+
last_updated: number;
|
|
120
|
+
name: string;
|
|
121
|
+
};
|
|
122
|
+
relationships: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
interface IBaseCampaignTemplateDTO<R> {
|
|
125
|
+
id: string;
|
|
126
|
+
type: 'template';
|
|
127
|
+
attributes: {
|
|
128
|
+
channel: string;
|
|
129
|
+
defaultVars?: Record<string, string>;
|
|
130
|
+
event: string;
|
|
131
|
+
name: string;
|
|
132
|
+
requiredVar?: string[];
|
|
133
|
+
template: R;
|
|
134
|
+
};
|
|
135
|
+
relationships: Record<string, unknown>;
|
|
136
|
+
}
|
|
137
|
+
export declare type ICampaignSMSTemplateDTO = IBaseCampaignTemplateDTO<ICampaignSMSAttributes>;
|
|
138
|
+
export declare type ICampaignEmailTemplateDTO = IBaseCampaignTemplateDTO<ICampaignEmailAttributes>;
|
|
139
|
+
export declare type ICampaignPassPushTemplateDTO = IBaseCampaignTemplateDTO<ICampaignPassPushAttributes>;
|
|
140
|
+
export declare type ICampaignWebPushTemplateDTO = IBaseCampaignTemplateDTO<ICampaignWebPushAttributes>;
|
|
141
|
+
export declare type ICampaignTemplateDTO = ICampaignSMSTemplateDTO | ICampaignEmailTemplateDTO | ICampaignPassPushTemplateDTO | ICampaignWebPushTemplateDTO;
|
|
142
|
+
interface CreateCampaignResponseDTO {
|
|
143
|
+
data: ICampaignJSONAPIDTO[];
|
|
144
|
+
included: [];
|
|
145
|
+
}
|
|
146
|
+
interface SetCohortToCampaignResponseDTO {
|
|
147
|
+
data: ICampaignJSONAPIDTO[];
|
|
148
|
+
included: ICampaignCohortDTO[];
|
|
149
|
+
}
|
|
150
|
+
interface SetTemplateToCampaignResponseDTO {
|
|
151
|
+
data: ICampaignJSONAPIDTO[];
|
|
152
|
+
included: (ICampaignCohortDTO | ICampaignTemplateDTO)[];
|
|
153
|
+
}
|
|
154
|
+
interface DeleteTemplateFromCampaignResponseDTO {
|
|
155
|
+
data: ICampaignJSONAPIDTO[];
|
|
156
|
+
included: (ICampaignCohortDTO | ICampaignTemplateDTO)[];
|
|
157
|
+
}
|
|
158
|
+
interface GetMyCohortsResponseDTO {
|
|
159
|
+
data: ICampaignCohortDTO[];
|
|
160
|
+
included: [];
|
|
161
|
+
}
|
|
162
|
+
interface CreateTemplateResponseDTO {
|
|
163
|
+
data: ICampaignTemplateDTO[];
|
|
164
|
+
included: [];
|
|
165
|
+
}
|
|
166
|
+
interface GetMyTemplatesResponseDTO {
|
|
167
|
+
data: ICampaignTemplateDTO[];
|
|
168
|
+
included: [];
|
|
169
|
+
}
|
|
170
|
+
interface GetTemplateByIdResponseDTO {
|
|
171
|
+
data: ICampaignTemplateDTO[];
|
|
172
|
+
included: [];
|
|
173
|
+
}
|
|
174
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare type ISO8601Date = string;
|
|
2
|
+
export declare type ICampaignChannel = 'email' | 'sms' | 'webPush' | 'passPush';
|
|
3
|
+
export interface ICampaignChannelData {
|
|
4
|
+
email?: string;
|
|
5
|
+
sms?: string;
|
|
6
|
+
webPush?: string;
|
|
7
|
+
passPush?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IUsersOperatingSystemsData {
|
|
10
|
+
android?: string;
|
|
11
|
+
ios?: string;
|
|
12
|
+
undefined?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ICampaignRun {
|
|
15
|
+
id: string;
|
|
16
|
+
count_of_users_to_send: number;
|
|
17
|
+
created_at: ISO8601Date;
|
|
18
|
+
failed: ICampaignChannelData | null;
|
|
19
|
+
planned: ICampaignChannelData | null;
|
|
20
|
+
run_at: ISO8601Date;
|
|
21
|
+
state: 'planned' | 'failed' | 'waitingStats' | 'completed';
|
|
22
|
+
success: ICampaignChannelData | null;
|
|
23
|
+
os: IUsersOperatingSystemsData | null;
|
|
24
|
+
}
|
|
25
|
+
export interface ICampaignCohort {
|
|
26
|
+
id: string;
|
|
27
|
+
count_of_users: number;
|
|
28
|
+
external_id: string;
|
|
29
|
+
last_updated: ISO8601Date;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
export declare type ICampaignSMSAttributes = {
|
|
33
|
+
msg: string;
|
|
34
|
+
};
|
|
35
|
+
export declare type ICampaignEmailAttributes = {
|
|
36
|
+
html: string;
|
|
37
|
+
subject: string;
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type ICampaignPassPushAttributes = {
|
|
41
|
+
msg: string;
|
|
42
|
+
title: string;
|
|
43
|
+
};
|
|
44
|
+
export declare type ICampaignWebPushAttributes = {
|
|
45
|
+
msg: string;
|
|
46
|
+
title: string;
|
|
47
|
+
};
|
|
48
|
+
export declare type ICampaignAnyAttributes = ICampaignSMSAttributes | ICampaignEmailAttributes | ICampaignPassPushAttributes | ICampaignWebPushAttributes;
|
|
49
|
+
export interface ICampaignTemplate<R = ICampaignAnyAttributes> {
|
|
50
|
+
id: string;
|
|
51
|
+
channel: ICampaignChannel;
|
|
52
|
+
defaultVars: Record<string, string>;
|
|
53
|
+
event: 'campaign';
|
|
54
|
+
name: string;
|
|
55
|
+
requiredVar: string[];
|
|
56
|
+
template: R;
|
|
57
|
+
}
|
|
58
|
+
export interface ICampaignJSONAPIDTO {
|
|
59
|
+
id: string;
|
|
60
|
+
type: 'campaign';
|
|
61
|
+
attributes: {
|
|
62
|
+
created_at: number;
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
relationships: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
export interface CampaignByID {
|
|
68
|
+
id: string;
|
|
69
|
+
created_at: ISO8601Date;
|
|
70
|
+
name: string;
|
|
71
|
+
campaign_run: ICampaignRun[];
|
|
72
|
+
cohort: ICampaignCohort[];
|
|
73
|
+
template: ICampaignTemplate[];
|
|
74
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IRequestWithCancelAndData } from '../IRequestWithCancelAndData';
|
|
2
|
+
import { I_JSON_API_Response_Many } from '../I_JSON_API_ResponseDTO';
|
|
3
|
+
import { CampaignByID } from './common';
|
|
4
|
+
export interface IGetCampaignById {
|
|
5
|
+
({ campaignId }: {
|
|
6
|
+
campaignId: string;
|
|
7
|
+
}): IRequestWithCancelAndData<GetCampaignByIdResponseDTO, I_JSON_API_Response_Many>;
|
|
8
|
+
}
|
|
9
|
+
export declare type GetCampaignByIdResponseDTO = CampaignByID[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ICampaignCohortDTO, ICampaignTemplateDTO } from './campaignInterfaces';
|
|
2
|
+
import { CampaignByID, ICampaignJSONAPIDTO } from './common';
|
|
3
|
+
import { IRequestWithCancelAndData } from '../IRequestWithCancelAndData';
|
|
4
|
+
import { I_JSON_API_Response_Many } from '../I_JSON_API_ResponseDTO';
|
|
5
|
+
export interface IGetMyCampaign {
|
|
6
|
+
(): IRequestWithCancelAndData<GetMyCampaignsResponseDTO, I_JSON_API_Response_Many<ICampaignJSONAPIDTO, ICampaignCohortDTO | ICampaignTemplateDTO>>;
|
|
7
|
+
}
|
|
8
|
+
export declare type GetMyCampaignsResponseDTO = CampaignByID[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGetCardBonusesResponseDTO } from '../issuer/IGetCardBonuses';
|
|
2
|
+
import { IRequestWithCancelAndData } from '../IRequestWithCancelAndData';
|
|
3
|
+
import { I_JSON_API_Response_Many } from '../I_JSON_API_ResponseDTO';
|
|
4
|
+
export declare type IGetBonusesResponseDTO = IGetCardBonusesResponseDTO;
|
|
5
|
+
export interface IGetBonuses {
|
|
6
|
+
(): IRequestWithCancelAndData<IGetBonusesResponseDTO, I_JSON_API_Response_Many>;
|
|
7
|
+
}
|