1.0.29 • Published 9 months ago
@maxzima/wa-communicator v1.0.29
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.29
9 months ago
1.0.28
9 months ago
1.0.27
9 months ago
1.0.26
10 months ago
1.0.25
10 months ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.10
2 years ago
0.0.17
3 years ago
0.0.16
3 years ago
0.0.15
3 years ago
0.0.14
3 years ago
0.0.13
3 years ago
0.0.12
3 years ago
0.0.11
3 years ago
0.0.10
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago