@queue-it/connector-javascript
Advanced tools
Comparing version 4.3.0 to 4.3.1
@@ -1,5 +0,5 @@ | ||
export * from "./connectorContextProvider"; | ||
export { IHttpRequest, IHttpResponse, IConnectorContextProvider, ICryptoProvider, IEnqueueTokenProvider, IHttpClientProvider } from "./connectorContextProvider"; | ||
export { DefaultEnqueueTokenProvider, ICustomData, } from "./defaultEnqueueTokenProvider"; | ||
export { KnownUser } from "./knownUser"; | ||
export * from "./models"; | ||
export { QueueEventConfig, CancelEventConfig, RequestValidationResult, ConnectorException, MissingSha256ImplementationException, ActionTypes, VerifyActionCallResult } from "./models"; | ||
export { QueueParameterHelper, QueueUrlParams, Utils } from "./queueitHelpers"; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (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" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Utils = exports.QueueUrlParams = exports.QueueParameterHelper = exports.KnownUser = exports.DefaultEnqueueTokenProvider = void 0; | ||
__exportStar(require("./connectorContextProvider"), exports); | ||
exports.Utils = exports.QueueUrlParams = exports.QueueParameterHelper = exports.VerifyActionCallResult = exports.ActionTypes = exports.MissingSha256ImplementationException = exports.ConnectorException = exports.RequestValidationResult = exports.CancelEventConfig = exports.QueueEventConfig = exports.KnownUser = exports.DefaultEnqueueTokenProvider = void 0; | ||
var defaultEnqueueTokenProvider_1 = require("./defaultEnqueueTokenProvider"); | ||
@@ -23,3 +8,10 @@ Object.defineProperty(exports, "DefaultEnqueueTokenProvider", { enumerable: true, get: function () { return defaultEnqueueTokenProvider_1.DefaultEnqueueTokenProvider; } }); | ||
Object.defineProperty(exports, "KnownUser", { enumerable: true, get: function () { return knownUser_1.KnownUser; } }); | ||
__exportStar(require("./models"), exports); | ||
var models_1 = require("./models"); | ||
Object.defineProperty(exports, "QueueEventConfig", { enumerable: true, get: function () { return models_1.QueueEventConfig; } }); | ||
Object.defineProperty(exports, "CancelEventConfig", { enumerable: true, get: function () { return models_1.CancelEventConfig; } }); | ||
Object.defineProperty(exports, "RequestValidationResult", { enumerable: true, get: function () { return models_1.RequestValidationResult; } }); | ||
Object.defineProperty(exports, "ConnectorException", { enumerable: true, get: function () { return models_1.ConnectorException; } }); | ||
Object.defineProperty(exports, "MissingSha256ImplementationException", { enumerable: true, get: function () { return models_1.MissingSha256ImplementationException; } }); | ||
Object.defineProperty(exports, "ActionTypes", { enumerable: true, get: function () { return models_1.ActionTypes; } }); | ||
Object.defineProperty(exports, "VerifyActionCallResult", { enumerable: true, get: function () { return models_1.VerifyActionCallResult; } }); | ||
var queueitHelpers_1 = require("./queueitHelpers"); | ||
@@ -26,0 +18,0 @@ Object.defineProperty(exports, "QueueParameterHelper", { enumerable: true, get: function () { return queueitHelpers_1.QueueParameterHelper; } }); |
import { IHttpRequest } from "../connectorContextProvider"; | ||
import * as IntegrationModels from "./integrationConfigModel"; | ||
import { CustomerIntegration, IntegrationConfigModel, TriggerPart } from "./integrationConfigModel"; | ||
export interface IIntegrationEvaluator { | ||
getMatchedIntegrationConfig(customerIntegration: IntegrationModels.CustomerIntegration, currentPageUrl: string, request: IHttpRequest): IntegrationModels.IntegrationConfigModel; | ||
getMatchedIntegrationConfig(customerIntegration: CustomerIntegration, currentPageUrl: string, request: IHttpRequest): IntegrationConfigModel; | ||
} | ||
export declare class IntegrationEvaluator implements IIntegrationEvaluator { | ||
getMatchedIntegrationConfig(customerIntegration: IntegrationModels.CustomerIntegration, currentPageUrl: string, request: IHttpRequest): IntegrationModels.IntegrationConfigModel; | ||
getMatchedIntegrationConfig(customerIntegration: CustomerIntegration, currentPageUrl: string, request: IHttpRequest): IntegrationConfigModel; | ||
private evaluateTrigger; | ||
@@ -12,3 +12,3 @@ private evaluateTriggerPart; | ||
export declare class UrlValidatorHelper { | ||
static evaluate(triggerPart: IntegrationModels.TriggerPart, url: string): boolean; | ||
static evaluate(triggerPart: TriggerPart, url: string): boolean; | ||
private static getUrlPart; | ||
@@ -19,13 +19,13 @@ static getHostNameFromUrl(url: string): string; | ||
export declare class CookieValidatorHelper { | ||
static evaluate(triggerPart: IntegrationModels.TriggerPart, request: IHttpRequest): boolean; | ||
static evaluate(triggerPart: TriggerPart, request: IHttpRequest): boolean; | ||
private static getCookie; | ||
} | ||
export declare class UserAgentValidatorHelper { | ||
static evaluate(triggerPart: IntegrationModels.TriggerPart, userAgent: string): boolean; | ||
static evaluate(triggerPart: TriggerPart, userAgent: string): boolean; | ||
} | ||
export declare class RequestBodyValidatorHelper { | ||
static evaluate(triggerPart: IntegrationModels.TriggerPart, bodyString: string): boolean; | ||
static evaluate(triggerPart: TriggerPart, bodyString: string): boolean; | ||
} | ||
export declare class HttpHeaderValidatorHelper { | ||
static evaluate(triggerPart: IntegrationModels.TriggerPart, headerValue: string): boolean; | ||
static evaluate(triggerPart: TriggerPart, headerValue: string): boolean; | ||
} | ||
@@ -32,0 +32,0 @@ export declare class ComparisonOperatorHelper { |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ComparisonOperatorHelper = exports.HttpHeaderValidatorHelper = exports.RequestBodyValidatorHelper = exports.UserAgentValidatorHelper = exports.CookieValidatorHelper = exports.UrlValidatorHelper = exports.IntegrationEvaluator = void 0; | ||
var models_1 = require("../models"); | ||
var IntegrationModels = __importStar(require("./integrationConfigModel")); | ||
var integrationConfigModel_1 = require("./integrationConfigModel"); | ||
var IntegrationEvaluator = /** @class */ (function () { | ||
@@ -50,3 +27,3 @@ function IntegrationEvaluator() { | ||
var part; | ||
if (trigger.LogicalOperator === IntegrationModels.LogicalOperatorType.Or) { | ||
if (trigger.LogicalOperator === integrationConfigModel_1.LogicalOperatorType.Or) { | ||
for (var _i = 0, _a = trigger.TriggerParts; _i < _a.length; _i++) { | ||
@@ -70,11 +47,11 @@ part = _a[_i]; | ||
switch (triggerPart.ValidatorType) { | ||
case IntegrationModels.ValidatorType.UrlValidator: | ||
case integrationConfigModel_1.ValidatorType.UrlValidator: | ||
return UrlValidatorHelper.evaluate(triggerPart, currentPageUrl); | ||
case IntegrationModels.ValidatorType.CookieValidator: | ||
case integrationConfigModel_1.ValidatorType.CookieValidator: | ||
return CookieValidatorHelper.evaluate(triggerPart, request); | ||
case IntegrationModels.ValidatorType.UserAgentValidator: | ||
case integrationConfigModel_1.ValidatorType.UserAgentValidator: | ||
return UserAgentValidatorHelper.evaluate(triggerPart, request.getUserAgent()); | ||
case IntegrationModels.ValidatorType.HttpHeaderValidator: | ||
case integrationConfigModel_1.ValidatorType.HttpHeaderValidator: | ||
return HttpHeaderValidatorHelper.evaluate(triggerPart, request.getHeader(triggerPart.HttpHeaderName)); | ||
case IntegrationModels.ValidatorType.RequestBodyValidator: | ||
case integrationConfigModel_1.ValidatorType.RequestBodyValidator: | ||
return RequestBodyValidatorHelper.evaluate(triggerPart, request.getRequestBodyAsString()); | ||
@@ -96,7 +73,7 @@ default: | ||
switch (triggerPart.UrlPart) { | ||
case IntegrationModels.UrlPartType.PagePath: | ||
case integrationConfigModel_1.UrlPartType.PagePath: | ||
return this.getPathFromUrl(url); | ||
case IntegrationModels.UrlPartType.PageUrl: | ||
case integrationConfigModel_1.UrlPartType.PageUrl: | ||
return url; | ||
case IntegrationModels.UrlPartType.HostName: | ||
case integrationConfigModel_1.UrlPartType.HostName: | ||
return this.getHostNameFromUrl(url); | ||
@@ -174,9 +151,9 @@ default: | ||
switch (opt) { | ||
case IntegrationModels.ComparisonOperatorType.EqualS: | ||
case integrationConfigModel_1.ComparisonOperatorType.EqualS: | ||
return ComparisonOperatorHelper.equalS(value, valueToCompare, isNegative, isIgnoreCase); | ||
case IntegrationModels.ComparisonOperatorType.Contains: | ||
case integrationConfigModel_1.ComparisonOperatorType.Contains: | ||
return ComparisonOperatorHelper.contains(value, valueToCompare, isNegative, isIgnoreCase); | ||
case IntegrationModels.ComparisonOperatorType.EqualsAny: | ||
case integrationConfigModel_1.ComparisonOperatorType.EqualsAny: | ||
return ComparisonOperatorHelper.equalsAny(value, valuesToCompare, isNegative, isIgnoreCase); | ||
case IntegrationModels.ComparisonOperatorType.ContainsAny: | ||
case integrationConfigModel_1.ComparisonOperatorType.ContainsAny: | ||
return ComparisonOperatorHelper.containsAny(value, valuesToCompare, isNegative, isIgnoreCase); | ||
@@ -183,0 +160,0 @@ default: |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -63,3 +40,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
exports.KnownUser = void 0; | ||
var IntegrationConfigHelpers = __importStar(require("./IntegrationConfig/integrationConfigHelpers")); | ||
var integrationConfigHelpers_1 = require("./IntegrationConfig/integrationConfigHelpers"); | ||
var models_1 = require("./models"); | ||
@@ -325,3 +302,3 @@ var queueitHelpers_1 = require("./queueitHelpers"); | ||
} | ||
configEvaluator = new IntegrationConfigHelpers.IntegrationEvaluator(); | ||
configEvaluator = new integrationConfigHelpers_1.IntegrationEvaluator(); | ||
matchedConfig = configEvaluator.getMatchedIntegrationConfig(customerIntegrationInfo, currentUrlWithoutQueueITToken, contextProvider.getHttpRequest()); | ||
@@ -328,0 +305,0 @@ if (connectorDiagnostics.isEnabled) { |
@@ -335,3 +335,3 @@ "use strict"; | ||
}; | ||
UserInQueueService.SDK_VERSION = "javascript-" + "4.3.0"; | ||
UserInQueueService.SDK_VERSION = "javascript-" + "4.3.1"; | ||
return UserInQueueService; | ||
@@ -338,0 +338,0 @@ }()); |
{ | ||
"name": "@queue-it/connector-javascript", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "Connector to integrate Queue-it into a javascript based server side application.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
274830
4057