gigya-node
Version:
Gigya SDK for NodeJS
362 lines • 16.2 kB
JavaScript
"use strict";
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.Accounts = void 0;
var rba_1 = require("./rba");
var tfa_1 = require("./tfa");
var accounts_webhooks_1 = require("./accounts.webhooks");
var otp_1 = require("./otp");
__exportStar(require("./tfa"), exports);
__exportStar(require("./otp"), exports);
__exportStar(require("./rba"), exports);
__exportStar(require("./accounts.webhooks"), exports);
__exportStar(require("./interfaces/account"), exports);
__exportStar(require("./interfaces/session-info"), exports);
__exportStar(require("./interfaces/gigya-response"), exports);
__exportStar(require("./interfaces/target-env"), exports);
__exportStar(require("./interfaces/session-expiration"), exports);
__exportStar(require("./interfaces/counter"), exports);
__exportStar(require("./interfaces/profile"), exports);
__exportStar(require("./interfaces/base-params"), exports);
var Accounts = /** @class */ (function () {
function Accounts(gigya) {
this.gigya = gigya;
this.rba = new rba_1.default(gigya);
this.tfa = new tfa_1.default(gigya);
this.otp = new otp_1.default(gigya);
this.webhooks = new accounts_webhooks_1.default(gigya);
}
/**
* This method deletes the specified user's account from Gigya's database.
*
* @see http://developers.gigya.com/display/GD/accounts.deleteAccount+REST
*/
Accounts.prototype.deleteAccount = function (params, options) {
return this.gigya.request('accounts.deleteAccount', params, options);
};
/**
* This method deletes a screen-set hosted by Gigya.
*
* @see http://developers.gigya.com/display/GD/accounts.deleteScreenSet+REST
*/
Accounts.prototype.deleteScreenSet = function (params, options) {
return this.gigya.request('accounts.deleteScreenSet', params, options);
};
/**
* This method allows sites integrating 3rd party plugins to validate the UID of a logged-in user.
*
* @see http://developers.gigya.com/display/GD/accounts.exchangeUIDSignature+REST
*/
Accounts.prototype.exchangeUIDSignature = function (params, options) {
return this.gigya.request('accounts.exchangeUIDSignature', params, options);
};
/**
* This method completes on-site user registration.
*
* @see http://developers.gigya.com/display/GD/accounts.finalizeRegistration+REST
*/
Accounts.prototype.finalizeRegistration = function (params, options) {
return this.gigya.request('accounts.finalizeRegistration', params, options);
};
/**
* This method retrieves user account data.
*
* @see http://developers.gigya.com/display/GD/accounts.getAccountInfo+REST
*/
Accounts.prototype.getAccountInfo = function (params, options) {
return this.gigya.request('accounts.getAccountInfo', params, options);
};
/**
* This method searches for a conflicting account: an account that uses the email associated with a social identity linked to the account currently logging in.
*
* @see http://developers.gigya.com/display/GD/accounts.getConflictingAccount+REST
*/
Accounts.prototype.getConflictingAccount = function (params, options) {
return this.gigya.request('accounts.getConflictingAccount', params, options);
};
/**
* In implementations of Consent Management, this method returns all the consent statements defined for a given site.
*
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/660b99419e294030968610cbb27f42bf.html
*/
Accounts.prototype.getConsentsStatements = function (params, options) {
return this.gigya.request('accounts.getConsentsStatements', params, options);
};
/**
* This method retrieves the details of a legal statement (associated with a consent statement), including the languages, versions, purpose, custom data.
*
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/660b99419e294030968610cbb27f42bf.html
*/
Accounts.prototype.getLegalStatements = function (params, options) {
return this.gigya.request('accounts.getLegalStatements', params, options);
};
/**
* This method retrieves the counters associated with a user ID (UID).
*
* @see http://developers.gigya.com/display/GD/accounts.getCounters+REST
*/
Accounts.prototype.getCounters = function (params, options) {
return this.gigya.request('accounts.getCounters', params, options);
};
/**
* This API allows retrieval of the public key necessary for validating an id_token returned from the accounts.getJWT API endpoint.
*
* @see http://developers.gigya.com/display/GD/accounts.getJWTPublicKey+REST
*/
Accounts.prototype.getJWTPublicKey = function (params, options) {
return this.gigya.request('accounts.getJWTPublicKey', params, options);
};
/**
* This API is used to obtain an OAuth2.0/OIDC compatible id_token containing an existing user's data.
*
* @see http://developers.gigya.com/display/GD/accounts.getJWT+REST
*/
Accounts.prototype.getJWT = function (params, options) {
return this.gigya.request('accounts.getJWT', params, options);
};
/**
* This method retrieves account policies.
*
* @see http://developers.gigya.com/display/GD/accounts.getPolicies+REST
*/
Accounts.prototype.getPolicies = function (params, options) {
return this.gigya.request('accounts.getPolicies', params, options);
};
/**
* This method returns the counters that were registered for the site using accounts.registerCounters.
*
* @see http://developers.gigya.com/display/GD/accounts.getRegisteredCounters+REST
*/
Accounts.prototype.getRegisteredCounters = function (params, options) {
return this.gigya.request('accounts.getRegisteredCounters', {}, options);
};
/**
* This method retrieves the schema of the Profile object and the Data object (the site specific custom data object) in Gigya's Accounts Storage.
*
* @see http://developers.gigya.com/display/GD/accounts.getSchema+REST
*/
Accounts.prototype.getSchema = function (params, options) {
return this.gigya.request('accounts.getSchema', params, options);
};
/**
* This method retrieves one or more screen-sets hosted by Gigya.
*
* @see http://developers.gigya.com/display/GD/accounts.getScreenSets+REST
*/
Accounts.prototype.getScreenSets = function (params, options) {
return this.gigya.request('accounts.getScreenSets', params, options);
};
/**
* This API returns all effective consents (complete) for the specified site/group API key.
*
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/13d09b52ca21463580b418599b46de64.html
*/
Accounts.prototype.getSiteConsentDetails = function (params, options) {
return this.gigya.request('accounts.getSiteConsentDetails', params, options);
};
/**
* This method retrieves Screenset's versions.
*
*/
Accounts.prototype.getScreenSetVersions = function (params, options) {
return this.gigya.request('accounts.getScreenSetVersions', params, options);
};
/**
* This method imports user account data into the Accounts Storage.
*
* @see http://developers.gigya.com/display/GD/accounts.importAccount+REST
*/
Accounts.prototype.importAccount = function (params, options) {
return this.gigya.request('accounts.importAccount', params, options);
};
/**
* This method imports a user's profile photo to Gigya's server.
*
* @see http://developers.gigya.com/display/GD/accounts.importProfilePhoto+REST
*/
Accounts.prototype.importProfilePhoto = function (params, options) {
return this.gigya.request('accounts.importProfilePhoto', params, options);
};
/**
* When creating a custom counter, you first register it using accounts.registerCounters, then increment it using the current method.
*
* @see http://developers.gigya.com/display/GD/accounts.incrementCounters+REST
*/
Accounts.prototype.incrementCounters = function (params, options) {
return this.gigya.request('accounts.incrementCounters', params, options);
};
/**
* This method initializes a registration process at a site.
*
* @see http://developers.gigya.com/display/GD/accounts.initRegistration+REST
*/
Accounts.prototype.initRegistration = function (params, options) {
if (params === void 0) { params = {}; }
return this.gigya.request('accounts.initRegistration', params, options);
};
/**
* This method checks whether a certain login identifier (username / email) is available.
*
* @see http://developers.gigya.com/display/GD/accounts.isAvailableLoginID+REST
*/
Accounts.prototype.isAvailableLoginID = function (params, options) {
return this.gigya.request('accounts.isAvailableLoginID', params, options);
};
/**
* This method merges the account identified by the provided UID with the account identified by the provided login credentials (loginID + password).
*
* @see http://developers.gigya.com/display/GD/accounts.linkAccounts+REST
*/
Accounts.prototype.linkAccounts = function (params, options) {
return this.gigya.request('accounts.linkAccounts', params, options);
};
/**
* This method logs a user into your site and opens a session for the logged-in user on success.
*
* @see http://developers.gigya.com/display/GD/accounts.login+REST
*/
Accounts.prototype.login = function (params, options) {
return this.gigya.request('accounts.login', params, options);
};
/**
* This method logs out the specified user of your site.
*
* @see http://developers.gigya.com/display/GD/accounts.logout+REST
*/
Accounts.prototype.logout = function (params, options) {
return this.gigya.request('accounts.logout', params, options);
};
/**
* This method notifies Gigya of an external login that happened outside of the Accounts system.
*
* @see http://developers.gigya.com/display/GD/accounts.notifyLogin+REST
*/
Accounts.prototype.notifyLogin = function (params, options) {
return this.gigya.request('accounts.notifyLogin', params, options);
};
/**
* This method publishes the last imported profile photo if it hadn't been published previously.
*
* @see http://developers.gigya.com/display/GD/accounts.publishProfilePhoto+REST
*/
Accounts.prototype.publishProfilePhoto = function (params, options) {
return this.gigya.request('accounts.publishProfilePhoto', params, options);
};
/**
* When creating a custom counter, you first register it using this method, then increment it using accounts.incrementCounters.
*
* @see http://developers.gigya.com/display/GD/accounts.registerCounters+REST
*/
Accounts.prototype.registerCounters = function (params, options) {
return this.gigya.request('accounts.registerCounters', params, options);
};
/**
* This method registers a new user at your site, in accordance with the predefined site Policies and the Schema of the Accounts Storage.
*
* @see http://developers.gigya.com/display/GD/accounts.register+REST
*/
Accounts.prototype.register = function (params, options) {
return this.gigya.request('accounts.register', params, options);
};
/**
* This method is used to resend a validation email to unverified addresses associated with the account.
*
* @see http://developers.gigya.com/display/GD/accounts.resendVerificationCode+REST
*/
Accounts.prototype.resendVerificationCode = function (params, options) {
return this.gigya.request('accounts.resendVerificationCode', params, options);
};
/**
* This method resets a user's password, either via email or directly.
*
* @see http://developers.gigya.com/display/GD/accounts.resetPassword+REST
*/
Accounts.prototype.resetPassword = function (params, options) {
return this.gigya.request('accounts.resetPassword', params, options);
};
/**
* Searches and retrieves data from Gigya's Accounts Storage using an SQL-like query.
*
* @see http://developers.gigya.com/display/GD/accounts.search+REST
*/
Accounts.prototype.search = function (params, options) {
return this.gigya.request('accounts.search', params, options);
};
/**
* This method sets account data into a user's account.
*
* @see http://developers.gigya.com/display/GD/accounts.setAccountInfo+REST
*/
Accounts.prototype.setAccountInfo = function (params, options) {
return this.gigya.request('accounts.setAccountInfo', params, options);
};
/**
* This method creates a new Consent Statement in SAP Customer Data Cloud or updates an existing one.
*
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/e598c585f0f548b799cea824ccee2bc5.html
*/
Accounts.prototype.setConsentsStatements = function (params, options) {
return this.gigya.request('accounts.setConsentsStatements', params, options);
};
/**
* This method sets the details of an existing consent statement, including the languages, versions, purpose, custom data.
*
* @see https://help.sap.com/viewer/8b8d6fffe113457094a17701f63e3d6a/GIGYA/en-US/6fd13c4e61c642a096323d6efdc22653.html
*/
Accounts.prototype.setLegalStatements = function (params, options) {
return this.gigya.request('accounts.setLegalStatements', params, options);
};
/**
* This method is used to modify site policies regarding user registration and login.
*
* @see http://developers.gigya.com/display/GD/accounts.setPolicies+REST
*/
Accounts.prototype.setPolicies = function (params, options) {
return this.gigya.request('accounts.setPolicies', params, options);
};
/**
* This method uploads a user's profile photo to Gigya's server.
*
* @see http://developers.gigya.com/display/GD/accounts.setProfilePhoto+REST
*/
Accounts.prototype.setProfilePhoto = function (params, options) {
return this.gigya.request('accounts.setProfilePhoto', params, options);
};
/**
* This method enables you to specify a schema for Gigya's Accounts Storage.
*
* @see http://developers.gigya.com/display/GD/accounts.setSchema+REST
*/
Accounts.prototype.setSchema = function (params, options) {
return this.gigya.request('accounts.setSchema', params, options);
};
/**
* This method updates a screen-set hosted by Gigya, or creates it if it does not exist.
*
* @see http://developers.gigya.com/display/GD/accounts.setScreenSet+REST
*/
Accounts.prototype.setScreenSet = function (params, options) {
return this.gigya.request('accounts.setScreenSet', params, options);
};
/**
* This method unregisters counters.
*
* @see http://developers.gigya.com/display/GD/accounts.unregisterCounters+REST
*/
Accounts.prototype.unregisterCounters = function (params, options) {
return this.gigya.request('accounts.unregisterCounters', params, options);
};
return Accounts;
}());
exports.Accounts = Accounts;
exports.default = Accounts;
//# sourceMappingURL=accounts.js.map