Socket
Socket
Sign inDemoInstall

@outreach/extensibility-sdk

Package Overview
Dependencies
0
Maintainers
193
Versions
180
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.4 to 0.2.5

dist/context/host/AccountContextUtils.js

339

dist/context/host/AccountContext.js

@@ -18,5 +18,4 @@ var __extends = (this && this.__extends) || (function () {

exports.AccountContext = void 0;
var AccountContextKeys_1 = require("../keys/AccountContextKeys");
var AccountContextUtils_1 = require("./AccountContextUtils");
var CustomContext_1 = require("./CustomContext");
var ExternalInfoUtils_1 = require("./ExternalInfoUtils");
var AccountContext = /** @class */ (function (_super) {

@@ -40,331 +39,15 @@ __extends(AccountContext, _super);

_this.initFrom = function (param) {
switch (param.key) {
case AccountContextKeys_1.AccountContextKeys.CUSTOM_ID:
_this.customId = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.DESCRIPTION:
_this.description = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.EXTERNAL:
_this.externalInfo = ExternalInfoUtils_1.ExternalInfoUtils.unpack(param.value);
break;
case AccountContextKeys_1.AccountContextKeys.ID:
_this.id = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.LOCALITY:
_this.locality = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.NAME:
_this.name = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.TAGS:
_this.tags = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_1:
_this.customField1 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_2:
_this.customField2 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_3:
_this.customField3 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_4:
_this.customField4 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_5:
_this.customField5 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_6:
_this.customField6 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_7:
_this.customField7 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_8:
_this.customField8 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_9:
_this.customField9 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_10:
_this.customField10 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_11:
_this.customField11 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_12:
_this.customField12 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_13:
_this.customField13 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_14:
_this.customField14 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_15:
_this.customField15 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_16:
_this.customField16 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_17:
_this.customField17 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_18:
_this.customField18 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_19:
_this.customField19 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_20:
_this.customField20 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_21:
_this.customField21 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_22:
_this.customField22 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_23:
_this.customField23 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_24:
_this.customField24 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_25:
_this.customField25 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_26:
_this.customField26 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_27:
_this.customField27 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_28:
_this.customField28 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_29:
_this.customField29 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_30:
_this.customField30 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_31:
_this.customField31 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_32:
_this.customField32 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_33:
_this.customField33 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_34:
_this.customField34 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_35:
_this.customField35 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_36:
_this.customField36 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_37:
_this.customField37 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_38:
_this.customField38 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_39:
_this.customField39 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_40:
_this.customField40 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_41:
_this.customField41 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_42:
_this.customField42 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_43:
_this.customField43 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_44:
_this.customField44 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_45:
_this.customField45 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_46:
_this.customField46 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_47:
_this.customField47 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_48:
_this.customField48 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_49:
_this.customField49 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_50:
_this.customField50 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_51:
_this.customField51 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_52:
_this.customField52 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_53:
_this.customField53 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_54:
_this.customField54 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_55:
_this.customField55 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_56:
_this.customField56 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_57:
_this.customField57 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_58:
_this.customField58 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_59:
_this.customField59 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_60:
_this.customField60 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_61:
_this.customField61 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_62:
_this.customField62 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_63:
_this.customField63 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_64:
_this.customField64 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_65:
_this.customField65 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_66:
_this.customField66 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_67:
_this.customField67 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_68:
_this.customField68 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_69:
_this.customField69 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_70:
_this.customField70 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_71:
_this.customField71 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_72:
_this.customField72 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_73:
_this.customField73 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_74:
_this.customField74 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_75:
_this.customField75 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_76:
_this.customField76 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_77:
_this.customField77 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_78:
_this.customField78 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_79:
_this.customField79 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_80:
_this.customField80 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_81:
_this.customField81 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_82:
_this.customField82 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_83:
_this.customField83 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_84:
_this.customField84 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_85:
_this.customField85 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_86:
_this.customField86 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_87:
_this.customField87 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_88:
_this.customField88 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_89:
_this.customField89 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_90:
_this.customField90 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_91:
_this.customField91 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_92:
_this.customField92 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_93:
_this.customField93 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_94:
_this.customField94 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_95:
_this.customField95 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_96:
_this.customField96 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_97:
_this.customField97 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_98:
_this.customField98 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_99:
_this.customField99 = param.value;
break;
case AccountContextKeys_1.AccountContextKeys.CUSTOM_FIELD_100:
_this.customField100 = param.value;
break;
default:
return false;
}
return true;
return AccountContextUtils_1.initAccountContext(_this, param);
};
return _this;
}
/**
* Converts current state of account context to an array of context params.
*
* @return {*} {ContextParam[]}
* @memberof AccountContext
*/
AccountContext.prototype.toParams = function () {
return AccountContextUtils_1.toAccountParams(this);
};
return AccountContext;

@@ -371,0 +54,0 @@ }(CustomContext_1.CustomContext));

@@ -0,9 +1,32 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomContext = void 0;
var CustomContext = /** @class */ (function () {
exports.CustomContext = exports.Context = void 0;
var Context = /** @class */ (function () {
function Context() {
}
return Context;
}());
exports.Context = Context;
var CustomContext = /** @class */ (function (_super) {
__extends(CustomContext, _super);
function CustomContext() {
return _super !== null && _super.apply(this, arguments) || this;
}
return CustomContext;
}());
}(Context));
exports.CustomContext = CustomContext;
//# sourceMappingURL=CustomContext.js.map

@@ -18,5 +18,4 @@ var __extends = (this && this.__extends) || (function () {

exports.OpportunityContext = void 0;
var OpportunityContextKeys_1 = require("../keys/OpportunityContextKeys");
var CustomContext_1 = require("./CustomContext");
var ExternalInfoUtils_1 = require("./ExternalInfoUtils");
var OpportunityContextUtils_1 = require("./OpportunityContextUtils");
var OpportunityContext = /** @class */ (function (_super) {

@@ -40,337 +39,15 @@ __extends(OpportunityContext, _super);

_this.initFrom = function (param) {
switch (param.key) {
case OpportunityContextKeys_1.OpportunityContextKeys.DESCRIPTION:
_this.description = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.EXTERNAL_CREATED_AT:
_this.externalCreatedAt = new Date(param.value);
break;
case OpportunityContextKeys_1.OpportunityContextKeys.EXTERNAL:
_this.externalInfo = ExternalInfoUtils_1.ExternalInfoUtils.unpack(param.value);
break;
case OpportunityContextKeys_1.OpportunityContextKeys.ID:
_this.id = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.NAME:
_this.name = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.NEXT_STEP:
_this.nextStep = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.PROBABILITY:
_this.probability = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.TAGS:
_this.tags = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.TYPE:
_this.opportunityType = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_1:
_this.customField1 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_2:
_this.customField2 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_3:
_this.customField3 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_4:
_this.customField4 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_5:
_this.customField5 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_6:
_this.customField6 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_7:
_this.customField7 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_8:
_this.customField8 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_9:
_this.customField9 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_10:
_this.customField10 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_11:
_this.customField11 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_12:
_this.customField12 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_13:
_this.customField13 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_14:
_this.customField14 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_15:
_this.customField15 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_16:
_this.customField16 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_17:
_this.customField17 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_18:
_this.customField18 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_19:
_this.customField19 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_20:
_this.customField20 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_21:
_this.customField21 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_22:
_this.customField22 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_23:
_this.customField23 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_24:
_this.customField24 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_25:
_this.customField25 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_26:
_this.customField26 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_27:
_this.customField27 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_28:
_this.customField28 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_29:
_this.customField29 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_30:
_this.customField30 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_31:
_this.customField31 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_32:
_this.customField32 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_33:
_this.customField33 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_34:
_this.customField34 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_35:
_this.customField35 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_36:
_this.customField36 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_37:
_this.customField37 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_38:
_this.customField38 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_39:
_this.customField39 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_40:
_this.customField40 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_41:
_this.customField41 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_42:
_this.customField42 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_43:
_this.customField43 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_44:
_this.customField44 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_45:
_this.customField45 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_46:
_this.customField46 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_47:
_this.customField47 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_48:
_this.customField48 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_49:
_this.customField49 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_50:
_this.customField50 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_51:
_this.customField51 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_52:
_this.customField52 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_53:
_this.customField53 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_54:
_this.customField54 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_55:
_this.customField55 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_56:
_this.customField56 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_57:
_this.customField57 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_58:
_this.customField58 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_59:
_this.customField59 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_60:
_this.customField60 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_61:
_this.customField61 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_62:
_this.customField62 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_63:
_this.customField63 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_64:
_this.customField64 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_65:
_this.customField65 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_66:
_this.customField66 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_67:
_this.customField67 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_68:
_this.customField68 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_69:
_this.customField69 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_70:
_this.customField70 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_71:
_this.customField71 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_72:
_this.customField72 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_73:
_this.customField73 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_74:
_this.customField74 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_75:
_this.customField75 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_76:
_this.customField76 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_77:
_this.customField77 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_78:
_this.customField78 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_79:
_this.customField79 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_80:
_this.customField80 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_81:
_this.customField81 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_82:
_this.customField82 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_83:
_this.customField83 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_84:
_this.customField84 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_85:
_this.customField85 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_86:
_this.customField86 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_87:
_this.customField87 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_88:
_this.customField88 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_89:
_this.customField89 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_90:
_this.customField90 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_91:
_this.customField91 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_92:
_this.customField92 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_93:
_this.customField93 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_94:
_this.customField94 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_95:
_this.customField95 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_96:
_this.customField96 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_97:
_this.customField97 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_98:
_this.customField98 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_99:
_this.customField99 = param.value;
break;
case OpportunityContextKeys_1.OpportunityContextKeys.CUSTOM_FIELD_100:
_this.customField100 = param.value;
break;
default:
return false;
}
return true;
return OpportunityContextUtils_1.initOpportunityContext(_this, param);
};
return _this;
}
/**
* Converts current state of opportunity context to an array of context params.
*
* @return {*} {ContextParam[]}
* @memberof OpportunityContext
*/
OpportunityContext.prototype.toParams = function () {
return OpportunityContextUtils_1.toOpportunityParams(this);
};
return OpportunityContext;

@@ -377,0 +54,0 @@ }(CustomContext_1.CustomContext));

@@ -18,6 +18,4 @@ var __extends = (this && this.__extends) || (function () {

exports.ProspectContext = void 0;
// eslint-disable-next-line no-unused-vars
var __1 = require("../..");
var CustomContext_1 = require("./CustomContext");
var ExternalInfoUtils_1 = require("./ExternalInfoUtils");
var ProspectContextUtils_1 = require("./ProspectContextUtils");
var ProspectContext = /** @class */ (function (_super) {

@@ -41,397 +39,15 @@ __extends(ProspectContext, _super);

_this.initFrom = function (param) {
switch (param.key) {
case __1.ProspectContextKeys.AVAILABLE_AT:
_this.availableAt = new Date(param.value);
break;
case __1.ProspectContextKeys.COMPANY:
_this.company = param.value;
break;
case __1.ProspectContextKeys.COMPANY_LOCALITY:
_this.companyLocality = param.value;
break;
case __1.ProspectContextKeys.ID:
_this.id = param.value;
break;
case __1.ProspectContextKeys.TAGS:
_this.tags = param.value;
break;
case __1.ProspectContextKeys.TIMEZONE:
_this.timezone = param.value;
break;
case __1.ProspectContextKeys.TITLE:
_this.title = param.value;
break;
case __1.ProspectContextKeys.EMAILS:
_this.emails = param.value.split(',');
break;
case __1.ProspectContextKeys.EXTERNAL:
_this.externalInfo = ExternalInfoUtils_1.ExternalInfoUtils.unpack(param.value);
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_1:
_this.customField1 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_2:
_this.customField2 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_3:
_this.customField3 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_4:
_this.customField4 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_5:
_this.customField5 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_6:
_this.customField6 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_7:
_this.customField7 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_8:
_this.customField8 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_9:
_this.customField9 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_10:
_this.customField10 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_11:
_this.customField11 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_12:
_this.customField12 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_13:
_this.customField13 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_14:
_this.customField14 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_15:
_this.customField15 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_16:
_this.customField16 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_17:
_this.customField17 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_18:
_this.customField18 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_19:
_this.customField19 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_20:
_this.customField20 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_21:
_this.customField21 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_22:
_this.customField22 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_23:
_this.customField23 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_24:
_this.customField24 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_25:
_this.customField25 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_26:
_this.customField26 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_27:
_this.customField27 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_28:
_this.customField28 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_29:
_this.customField29 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_30:
_this.customField30 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_31:
_this.customField31 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_32:
_this.customField32 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_33:
_this.customField33 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_34:
_this.customField34 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_35:
_this.customField35 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_36:
_this.customField36 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_37:
_this.customField37 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_38:
_this.customField38 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_39:
_this.customField39 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_40:
_this.customField40 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_41:
_this.customField41 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_42:
_this.customField42 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_43:
_this.customField43 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_44:
_this.customField44 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_45:
_this.customField45 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_46:
_this.customField46 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_47:
_this.customField47 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_48:
_this.customField48 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_49:
_this.customField49 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_50:
_this.customField50 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_51:
_this.customField51 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_52:
_this.customField52 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_53:
_this.customField53 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_54:
_this.customField54 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_55:
_this.customField55 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_56:
_this.customField56 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_57:
_this.customField57 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_58:
_this.customField58 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_59:
_this.customField59 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_60:
_this.customField60 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_61:
_this.customField61 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_62:
_this.customField62 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_63:
_this.customField63 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_64:
_this.customField64 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_65:
_this.customField65 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_66:
_this.customField66 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_67:
_this.customField67 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_68:
_this.customField68 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_69:
_this.customField69 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_70:
_this.customField70 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_71:
_this.customField71 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_72:
_this.customField72 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_73:
_this.customField73 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_74:
_this.customField74 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_75:
_this.customField75 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_76:
_this.customField76 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_77:
_this.customField77 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_78:
_this.customField78 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_79:
_this.customField79 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_80:
_this.customField80 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_81:
_this.customField81 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_82:
_this.customField82 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_83:
_this.customField83 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_84:
_this.customField84 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_85:
_this.customField85 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_86:
_this.customField86 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_87:
_this.customField87 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_88:
_this.customField88 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_89:
_this.customField89 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_90:
_this.customField90 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_91:
_this.customField91 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_92:
_this.customField92 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_93:
_this.customField93 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_94:
_this.customField94 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_95:
_this.customField95 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_96:
_this.customField96 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_97:
_this.customField97 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_98:
_this.customField98 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_99:
_this.customField99 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_100:
_this.customField100 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_101:
_this.customField101 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_102:
_this.customField102 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_103:
_this.customField103 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_104:
_this.customField104 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_105:
_this.customField105 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_106:
_this.customField106 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_107:
_this.customField107 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_108:
_this.customField108 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_109:
_this.customField109 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_110:
_this.customField110 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_111:
_this.customField111 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_112:
_this.customField112 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_113:
_this.customField113 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_114:
_this.customField114 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_115:
_this.customField115 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_116:
_this.customField116 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_117:
_this.customField117 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_118:
_this.customField118 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_119:
_this.customField119 = param.value;
break;
case __1.ProspectContextKeys.CUSTOM_FIELD_120:
_this.customField120 = param.value;
break;
default:
return false;
}
return true;
return ProspectContextUtils_1.initProspectContext(_this, param);
};
return _this;
}
/**
* Converts current state of account context to an array of context params.
*
* @return {*} {ContextParam[]}
* @memberof ProspectContext
*/
ProspectContext.prototype.toParams = function () {
return ProspectContextUtils_1.toProspectParams(this);
};
return ProspectContext;

@@ -438,0 +54,0 @@ }(CustomContext_1.CustomContext));

@@ -0,1 +1,16 @@

var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });

@@ -5,5 +20,7 @@ exports.UserContext = void 0;

var UserContextKeys_1 = require("../keys/UserContextKeys");
var UserContext = /** @class */ (function () {
var CustomContext_1 = require("./CustomContext");
var UserContext = /** @class */ (function (_super) {
__extends(UserContext, _super);
function UserContext() {
var _this = this;
var _this = _super !== null && _super.apply(this, arguments) || this;
/**

@@ -14,3 +31,3 @@ * Attempts to initialize the opportunity context with a given parameter.

*/
this.initFrom = function (param) {
_this.initFrom = function (param) {
switch (param.key) {

@@ -55,6 +72,77 @@ case UserContextKeys_1.UserContextKeys.EMAIL:

};
return _this;
}
UserContext.prototype.toParams = function () {
var params = [];
if (this.email) {
params.push({
key: UserContextKeys_1.UserContextKeys.EMAIL,
value: this.email,
});
}
if (this.firstName) {
params.push({
key: UserContextKeys_1.UserContextKeys.FIRST_NAME,
value: this.firstName,
});
}
if (this.id) {
params.push({
key: UserContextKeys_1.UserContextKeys.ID,
value: this.id,
});
}
if (this.lastName) {
params.push({
key: UserContextKeys_1.UserContextKeys.LAST_NAME,
value: this.lastName,
});
}
if (this.title) {
params.push({
key: UserContextKeys_1.UserContextKeys.TITLE,
value: this.title,
});
}
if (this.username) {
params.push({
key: UserContextKeys_1.UserContextKeys.USERNAME,
value: this.username,
});
}
if (this.customField1) {
params.push({
key: UserContextKeys_1.UserContextKeys.CUSTOM_FIELD_1,
value: this.customField1,
});
}
if (this.customField2) {
params.push({
key: UserContextKeys_1.UserContextKeys.CUSTOM_FIELD_2,
value: this.customField2,
});
}
if (this.customField3) {
params.push({
key: UserContextKeys_1.UserContextKeys.CUSTOM_FIELD_3,
value: this.customField3,
});
}
if (this.customField4) {
params.push({
key: UserContextKeys_1.UserContextKeys.CUSTOM_FIELD_4,
value: this.customField4,
});
}
if (this.customField5) {
params.push({
key: UserContextKeys_1.UserContextKeys.CUSTOM_FIELD_5,
value: this.customField5,
});
}
return params;
};
return UserContext;
}());
}(CustomContext_1.Context));
exports.UserContext = UserContext;
//# sourceMappingURL=UserContext.js.map

@@ -10,2 +10,19 @@ Object.defineProperty(exports, "__esModule", { value: true });

function OutreachContext() {
var _this = this;
this.toParams = function () {
var params = [];
if (_this.account) {
_this.account.toParams().forEach(function (p) { return params.push(p); });
}
if (_this.opportunity) {
_this.opportunity.toParams().forEach(function (p) { return params.push(p); });
}
if (_this.prospect) {
_this.prospect.toParams().forEach(function (p) { return params.push(p); });
}
if (_this.user) {
_this.user.toParams().forEach(function (p) { return params.push(p); });
}
return params;
};
this.host = new HostContext_1.HostContext();

@@ -12,0 +29,0 @@ }

@@ -29,7 +29,3 @@ var __extends = (this && this.__extends) || (function () {

var _this = _super !== null && _super.apply(this, arguments) || this;
_this.hostUrlValidation = function () {
var hostUrl = _this.host.url;
if (!hostUrl) {
return false;
}
_this.hostUrlValidation = function (hostUrl) {
var contextParams = [];

@@ -58,2 +54,3 @@ _this.context.forEach(function (key) { return contextParams.push({ key: key, value: 'marker' }); });

try {
// 1. copy url search parameters to context urlParams
var url = new URL(this.host.url);

@@ -68,2 +65,7 @@ var searchParams = new URLSearchParams(url.search);

});
//2. complete the tokenize url with contextual data of host url and notifications url
this.host.url = utils_1.utils.tokenizeUrl(this.host.url, context.toParams()).url;
if (this.host.notificationsUrl) {
this.host.notificationsUrl = utils_1.utils.tokenizeUrl(this.host.notificationsUrl, context.toParams()).url;
}
}

@@ -97,3 +99,3 @@ catch (e) {

}
if (!this.hostUrlValidation()) {
if (!this.hostUrlValidation(this.host.url)) {
issues.push('Host url is invalid. Value: ' + this.host.url);

@@ -105,2 +107,12 @@ }

}
if (this.host.notificationsUrl) {
if (!this.hostUrlValidation(this.host.notificationsUrl)) {
issues.push('Notifications url definition is invalid url. Value: ' +
this.host.notificationsUrl);
}
if (this.type !== TabExtensionType_1.TabExtensionType.APPLICATION) {
issues.push('Notifications url can be defined only for application tab extension. Type: ' +
this.type);
}
}
}

@@ -107,0 +119,0 @@ if (!this.context) {

{
"name": "@outreach/extensibility-sdk",
"license": "MIT",
"version": "0.2.4",
"version": "0.2.5",
"private": false,

@@ -32,3 +32,3 @@ "contributors": [

"devDependencies": {
"@types/jest": "^26.0.20",
"@types/jest": "^27.0.1",
"@typescript-eslint/eslint-plugin": "^4.15.1",

@@ -35,0 +35,0 @@ "@typescript-eslint/parser": "^4.15.1",

@@ -9,4 +9,8 @@ <!-- omit in toc -->

- [How it works](#how-it-works)
- [Required steps to build an Outreach application](#required-steps-to-build-an-outreach-application)
- [Outreach extensibility SDK](#outreach-extensibility-sdk)
- [How it works](#how-it-works)
- [Required steps to build an Outreach application](#required-steps-to-build-an-outreach-application)
- [What can you make?](#what-can-you-make)
- [Application extensions](#application-extensions)
- [Tab extensions](#tab-extensions)

@@ -25,7 +29,7 @@ ## How it works

1. Every application needs to have an application hosting web page, which will Outreach users see loaded as a source of application iframe. This page implementation has to follow [a very small set of requirements](/docs/host-requirements.md).
1. Every application needs to have an application hosting web page, which will Outreach users see loaded as a source of application iframe. This page implementation has to follow [a very small set of requirements](/docs/host-requirements.md).
_During the development phase, application creators can skip this requirement and use only a [Locally hosted application page](/docs/devxp.md) without the need to have a publicly available page._
2. Every application also needs to **create and upload a manifest file**.
2. Every application also needs to **create and upload a manifest file**.
That manifest file contains things like the URL where the application web page is located, contextual information which application needs from Outreach, details about Outreach API access, etc.

@@ -37,11 +41,11 @@

3. All stateful applications would need contextual information from Outreach to initialize themselves in the proper state. For that, they need to **parse from the URL** a set of contextual information (e.g., opportunity id, prospect email, etc.) sent by Outreach.
3. All stateful applications would need contextual information from Outreach to initialize themselves in the proper state. For that, they need to **parse from the URL** a set of contextual information (e.g., opportunity id, prospect email, etc.) sent by Outreach.
Go to [host url parameters parsing](/docs/url-parsing.md) page to learn more.
4. Most of the applications would want to have **deeper integration with the Outreach application** (e.g., to notify Outreach users about some application event). For that, the application will need to integrate Outreach client sdk.
4. Most of the applications would want to have **deeper integration with the Outreach application** (e.g., to notify Outreach users about some application event). For that, the application will need to integrate Outreach client sdk.
Go to [Outreach client SDK](/docs/sdk.md) page to learn more.
5. Some of the applications will need to have **client access to Outreach API**, and for that, they will need to add support on the application server required for obtaining and refreshing access tokens. This will include implementing additional endpoints, server to server calls to Outreach API, token caching, etc.
5. Some of the applications will need to have **client access to Outreach API**, and for that, they will need to add support on the application server required for obtaining and refreshing access tokens. This will include implementing additional endpoints, server to server calls to Outreach API, token caching, etc.

@@ -52,2 +56,28 @@ Go to [Outreach API access](/docs/outreach-api.md) page to learn more about API access requirements.

\*If you have any questions/comments/concerns about the extensibility, please check the [FAQ](/docs/faq.md) or email us at **cxt-sdk@outreach.io.***
*If you have any questions/comments/concerns about the extensibility, please check the [FAQ](/docs/faq.md) or email us at **cxt-sdk@outreach.io.***
## What can you make?
There are two types of application extensions you can create with the Outreach client sdk: application extension and tab extension.
### Application extensions
Application extension is a type of extension where the application creator wants to bring its all app to Outreach.
![alt text](docs/assets/app-tab-extension-example.png "Left side menu addon example")
This type of extension has an icon in the left side menu at the same level as other Outreach icons. Clicking on that icon will load an iframe taking the whole space and showing the extension host page defined in the manifest.
Application extension can receive only user and organisation [contextual information](context.md).
Application extension can define a special [notifications endpoint](manifest.md#notificationsurl), which will enable it to implement things as unread notifications badge decoration, show informational toast, etc., even before Outreach user interacted with the addon.
### Tab extensions
Tab extension is an extension that enables you to load your application in a context of a specific account, prospect, or opportunity. Your application is being loaded as an additional tab beside other standard Outreach tabs.
![alt text](docs/assets/account-tab-extension-example.png "Tab addon example")
Tab extension are loaded after the tab is being opened.
In addition to the organization and user context available to application extension, they can receive current account context (account tab), current prospect context (prospect tab), and current opportunity context (opportunity tab).
Tab extension do not support the notification feature application addons have.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc