gigya-node
Version:
Gigya SDK for NodeJS
61 lines • 2.94 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OTP = void 0;
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/base-params"), exports);
__exportStar(require("./interfaces/otp"), exports);
var OTP = /** @class */ (function () {
function OTP(gigya) {
this.gigya = gigya;
}
/**
* This API removes the phone number from the specified account.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/8f313cc471f549d49fcc8ab3a430aea9.html
*/
OTP.prototype.delete = function (params, options) {
return this.gigya.request('accounts.otp.delete', params, options);
};
/**
* This method is used to log in users via Phone Number Login. It requires the vToken and code returned from accounts.OTP.sendCode.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/4137bbe870b21014bbc5a10ce4041860.html
*/
OTP.prototype.login = function (params, options) {
return this.gigya.request('accounts.otp.login', params, options);
};
/**
* This method is used to trigger a Phone Number Login flow, or is part of an email code verification flow.
* It accepts the user's phone number or email, returns a vToken, and sends an authentication code to the user.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/4137e1be70b21014bbc5a10ce4041860.html
*/
OTP.prototype.sendCode = function (params, options) {
return this.gigya.request('accounts.otp.sendCode', params, options);
};
/**
* This method is used to update a user's phone number when using Phone Number Login, or their email in an email code verification flow.
* It requires the vToken and code returned from accounts.OTP.sendCode.
* When using this method client side, an active user session is required.
* When calling this method server side, it requires the UID param.
*
* @see https://help.sap.com/docs/SAP_CUSTOMER_DATA_CLOUD/8b8d6fffe113457094a17701f63e3d6a/413807a270b21014bbc5a10ce4041860.html
*/
OTP.prototype.update = function (params, options) {
return this.gigya.request('accounts.otp.update', params, options);
};
return OTP;
}());
exports.OTP = OTP;
exports.default = OTP;
//# sourceMappingURL=otp.js.map