1.0.39 • Published 11 months ago
@maxzima/wa-communicator v1.0.39
Import communicator modules
Import all
import {
Communicator,
AccountTracker,
CommunicatorUpdateChallengeCustomErrorCodeEnum,
CommunicatorVerifyChallengeCustomErrorCodeEnum,
CommunicatorEmailCustomErrorCodeEnum,
TChallenge,
TCreateSessionResponse,
TResponse,
TSetupChallengeResponse,
TSignInByMobileResponse,
TVerifyChallengeResponse,
TGetCurrentUserProfileResponseUser
} from "@maxzima/wa-communicator/dist";Import only Communicator
import {
Communicator,
CommunicatorUpdateChallengeCustomErrorCodeEnum,
CommunicatorVerifyChallengeCustomErrorCodeEnum,
CommunicatorEmailCustomErrorCodeEnum,
TChallenge,
TCreateSessionResponse,
TResponse,
TSetupChallengeResponse,
TSignInByMobileResponse,
TVerifyChallengeResponse,
TGetCurrentUserProfileResponseUser
} from '@maxzima/wa-communicator/dist';Import only AccountTracker
import {
AccountTracker,
} from '@maxzima/wa-communicator/dist';Usage Sender
const communicator = new Communicator({
clientAuthApiBaseUrl: 'https://api-auth.google.com/v1/',
clientFAPIBaseUrl: 'https://api-frontend.google.com/v1/',
});
communicator.signIn({
phoneNumber: '+18004397566',
})
.then((response) => callback(response));
communicator.setupChallenge({
type: 'email_otp',
authToken: 'some_auth_token...',
})
.then((response) => callback(response));
communicator.verifyChallenge({
type: 'email_otp',
code: '123456',
authToken: 'some_auth_token...',
})
.then((response) => callback(response));
communicator.emailUpdate({
email: 'exampleEmail.gmail.com',
authToken: 'some_auth_token...',
})
.then((response) => callback(response));
communicator.createSession({
authToken: 'some_auth_token...',
})
.then((response) => callback(response));
communicator.signUp({
locale: 'en',
phoneNumber: '+18004397566',
timezoneName: 'Asia/Qatar',
})
.then((response) => callback(response));
communicator.registration({
accessToken: 'some_access_token...',
name: 'companyName',
hash: 'some_tracking_hash...',
deviceType: 'mobile',
gaId: 'gaId_cookie_value',
origin: 'business',
})
.then((response) => callback(response));
communicator.getCurrentUserProfile({
accessToken: 'some_access_token...',
})
.then((response) => callback(response))Usage AccountTracker
const tracker = new AccountTracker({
origin: 'business',
gtag: window.gtag, // gtag script width ga4_id
lintrk: window.lintrk, // lintrk script with _linkedin_partner_id
ga4Id:'some_ga4_id',
});
/* tracking after sending phone number */
tracker.sendPhoneVerifyEvent();
/* tracking after email verification */
tracker.sendEmailVerifyEvent();
/* tracking after registration */
tracker.sendRegistrationSuccessEvent();1.0.33
1 year ago
1.0.32
1 year ago
1.0.31
1 year ago
1.0.30
1 year ago
1.0.37
1 year ago
1.0.36
1 year ago
1.0.35
1 year ago
1.0.34
1 year ago
1.0.39
11 months ago
1.0.38
11 months ago
1.0.29
2 years ago
1.0.28
2 years ago
1.0.27
2 years ago
1.0.26
2 years ago
1.0.25
2 years ago
1.0.22
2 years ago
1.0.21
2 years ago
1.0.24
2 years ago
1.0.23
2 years ago
1.0.20
2 years ago
1.0.19
2 years ago
1.0.18
2 years ago
1.0.17
2 years ago
1.0.16
2 years ago
1.0.15
2 years ago
1.0.14
2 years ago
1.0.13
2 years ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.10
2 years ago
0.0.17
4 years ago
0.0.16
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.12
4 years ago
0.0.11
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago