@artsy/cohesion
Version:
Analytics schema
113 lines (104 loc) • 2.54 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AuthModalType = void 0;
/**
* Schemas describing authentication events
* @packageDocumentation
*/
/**
* A user viewed an authentication form
*
* This schema describes events sent to Segment from [[authImpression]]
*
* @example
* ```
* {
* action: "authImpression",
* context_module: "popUpModal",
* intent: "viewArtist",
* modal_copy: "Sign up to follow artists",
* onboarding: true,
* trigger: "timed",
* trigger_seconds: 4,
* type: "signup",
* }
* ```
*/
/**
* A user created an account
*
* This schema describes events sent to Segment from [[createdAccount]]
*
* @example
* ```
* {
* action: "createdAccount",
* auth_redirect: "https://artsy.net/artist/andy-warhol",
* context_module: "popUpModal",
* intent: "viewArtist",
* modal_copy: "Sign up to follow artists",
* onboarding: true,
* service: "email",
* trigger: "timed",
* trigger_seconds: 4,
* type: signup,
* user_id: "5bd8b675776bd6002c86526c"
* }
* ```
*/
/**
* A user requested to reset their password for an existing account
*
* This schema describes events sent to Segment from [[resetYourPassword]]
*
* @example
* ```
* {
* action: "resetYourPassword",
* auth_redirect: "https://artsy.net/artist/andy-warhol",
* context_module: "popUpModal",
* intent: "viewArtist",
* modal_copy: "Sign up to follow artists",
* service: "email",
* trigger: "timed",
* trigger_seconds: 4,
* type: "forgot"
* }
* ```
*/
/**
* A user successfully logged in to their existing account
*
* This schema describes events sent to Segment from [[successfullyLoggedIn]]
*
* @example
* ```
* {
* action: "successfullyLoggedIn",
* auth_redirect: "https://artsy.net/artist/andy-warhol",
* context_module: "popUpModal",
* intent: "viewArtist",
* modal_copy: "Sign up to follow artists",
* service: "email",
* trigger: "timed",
* trigger_seconds: 4,
* type: "login",
* user_id: "5bd8b675776bd6002c86526c"
* }
* ```
*/
/**
* The type of authentication modal displayed
*/
var AuthModalType;
/**
* The type of action that opened the authentication modal
*/
exports.AuthModalType = AuthModalType;
(function (AuthModalType) {
AuthModalType["forgot"] = "forgot";
AuthModalType["login"] = "login";
AuthModalType["signup"] = "signup";
})(AuthModalType || (exports.AuthModalType = AuthModalType = {}));